
linux
Z000000Y
这个作者很懒,什么都没留下…
展开
-
vim bundle config
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vimvim .vimrc write below code into vimrcset nocompatible filetype off set rtp+=原创 2016-11-24 14:45:51 · 305 阅读 · 0 评论 -
linux 内核进程监控 针对bash下启动的程序
原创 2017-05-20 13:55:44 · 421 阅读 · 0 评论 -
hello.c kernel Makefile
ifneq ($(KERNELRELEASE),) # after ifneq ,there is a space! or,will get an errorobj-m := hello.o else KERNELDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE)转载 2017-05-19 10:15:17 · 281 阅读 · 0 评论 -
centos install nginx apache
apache2yum install httpdservice httpd startwget 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 · 236 阅读 · 0 评论 -
netlink+kprobe实现linux下进程监控
#include #include #include #include #include #include #include#define NETLINK_USER 31struct sock *nl_sk = NULL;struct nlmsghdr *nlh;int pid;static struct kprobe kp = { .symbol_n原创 2017-05-25 15:16:29 · 1674 阅读 · 2 评论 -
linux 下java环境配置
read -p "input jdk path: " jdkecho $jdkjava_config="JAVA_HOME=$jdk"echo $java_configecho $java_config>>/etc/profileecho "export JRE_HOME=$jdk/jre">>/etc/profileecho "export CLASSPATH=\$JAVA_HOM原创 2017-04-26 12:26:05 · 231 阅读 · 0 评论 -
python unicode
b=a.decode('gbk').encode('utf-8')原创 2016-12-15 11:50:33 · 428 阅读 · 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 · 249 阅读 · 0 评论 -
kill all process by input process name
pname=$1array=(` ps aux |grep $pname |awk '{print $2} ' `)#array=(1 2 3)num=${#array[@]}#echo $numlength=` expr $num - 1 `#echo $lengthfor((i=0;i<length;i++))do kill -9 ${array[$i]}原创 2016-11-25 21:03:18 · 258 阅读 · 0 评论 -
linux socket server
#include #include #include #include #include #include #include #include #include #define host "127.0.0.1"#define port 8119int kbhit1(void){ struct termios oldt, newt;原创 2016-12-07 16:45:13 · 233 阅读 · 0 评论 -
linux socket
#include #include #include #include #include #include #define port 8886int main(){ int sock=socket(AF_INET,SOCK_STREAM,0); struct sockaddr_in sockaddrtest; memset(&sockaddrtest,0原创 2016-12-06 18:27:32 · 180 阅读 · 0 评论 -
linux socket
#include #include #include #include #include #include #include #include #define PORT 8887#define BUFFER_SIZE 1024int main(){ int sock; sock=socket(AF_INET,SOCK_STREAM,0); struc原创 2016-12-05 17:00:45 · 274 阅读 · 0 评论 -
dockerinstallbashshell
#!/bin/shset -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 · 466 阅读 · 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 · 821 阅读 · 0 评论