linux
Z000000Y
这个作者很懒,什么都没留下…
展开
-
vim bundle config
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim vim .vimrc write below code into vimrc set nocompatible filetype off set rtp+=原创 2016-11-24 14:45:51 · 277 阅读 · 0 评论 -
linux 内核进程监控 针对bash下启动的程序
原创 2017-05-20 13:55:44 · 387 阅读 · 0 评论 -
hello.c kernel Makefile
ifneq ($(KERNELRELEASE),) # after ifneq ,there is a space! or,will get an error obj-m := hello.o else KERNELDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE)转载 2017-05-19 10:15:17 · 251 阅读 · 0 评论 -
centos install nginx apache
apache2 yum install httpd service httpd start wget http://www.atomicorp.com/installers/atomic sh ./atomic yum check-update yum install nginx nginx path /etc/nginx/conf.d/de原创 2017-05-10 15:33:40 · 211 阅读 · 0 评论 -
netlink+kprobe实现linux下进程监控
#include #include #include #include #include #include #include #define NETLINK_USER 31 struct sock *nl_sk = NULL; struct nlmsghdr *nlh; int pid; static struct kprobe kp = { .symbol_n原创 2017-05-25 15:16:29 · 1501 阅读 · 2 评论 -
linux 下java环境配置
read -p "input jdk path: " jdk echo $jdk java_config="JAVA_HOME=$jdk" echo $java_config echo $java_config>>/etc/profile echo "export JRE_HOME=$jdk/jre">>/etc/profile echo "export CLASSPATH=\$JAVA_HOM原创 2017-04-26 12:26:05 · 200 阅读 · 0 评论 -
python unicode
b=a.decode('gbk').encode('utf-8')原创 2016-12-15 11:50:33 · 398 阅读 · 0 评论 -
mysql error
s blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' /usr/bin/mysqladmin flush-hosts -h 127.0.0.1 -p3306 -uroot -p123456原创 2016-12-15 09:50:32 · 225 阅读 · 0 评论 -
kill all process by input process name
pname=$1 array=(` ps aux |grep $pname |awk '{print $2} ' `) #array=(1 2 3) num=${#array[@]} #echo $num length=` expr $num - 1 ` #echo $length for((i=0;i<length;i++)) do kill -9 ${array[$i]}原创 2016-11-25 21:03:18 · 231 阅读 · 0 评论 -
linux socket server
#include #include #include #include #include #include #include #include #include #define host "127.0.0.1" #define port 8119 int kbhit1(void) { struct termios oldt, newt;原创 2016-12-07 16:45:13 · 193 阅读 · 0 评论 -
linux socket
#include #include #include #include #include #include #define port 8886 int main() { int sock=socket(AF_INET,SOCK_STREAM,0); struct sockaddr_in sockaddrtest; memset(&sockaddrtest,0原创 2016-12-06 18:27:32 · 147 阅读 · 0 评论 -
linux socket
#include #include #include #include #include #include #include #include #define PORT 8887 #define BUFFER_SIZE 1024 int main() { int sock; sock=socket(AF_INET,SOCK_STREAM,0); struc原创 2016-12-05 17:00:45 · 239 阅读 · 0 评论 -
dockerinstallbashshell
#!/bin/sh set -e # # This script is meant for quick & easy install via: # 'curl -sSL https://get.docker.com/ | sh' # or: # 'wget -qO- https://get.docker.com/ | sh' # # For test builds (ie.转载 2016-11-24 11:58:58 · 426 阅读 · 0 评论 -
centos 网卡配置 已经各种报错解决
ifconfig -a 找到对应的网卡名称 centos7默认为ens33 那么在/etc/sysconfig/network-scripts/ 下vim ifcfg-ens33 注意device 一定要跟ifconfig -a 查到的一样 这就是linux下的设备描述符 写过内核驱动的人都应该知道 这个是唯一的标识符就也是因为systemctl status ne原创 2017-07-27 14:25:00 · 767 阅读 · 0 评论