Linux
在编译nginx时遇到rewrite module requires the PCRE library错误,提示需要PCRE库,解决方法,安装PCRE库:
ubuntu下执行
apt-get install libpcre3-dev
RHEL下执行
yum -y install pcre-devel
解决 ssh 远程连接慢的问题
vim /etc/ssh/sshd_config
将 UseDNS yes 改成 UseDNS no(注意要将UseDNS前面的#号去掉,不然没用)
查看端口
mac:
lsof -i tcp:port
linux:
netstat -tln | grep 8080
netstat -natp
CenterOS 开机运行自己的命令
把启动程序的命令添加到/etc/rc.d/rc.local文件中
路由表:
route -n
#查看路由表
[root@node01 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.220.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 192.168.220.2 0.0.0.0 UG 0 0 0 eth0
#创建虚拟网卡:
ifconfig eth0:3 192.168.88.88/24 代表创建了一个虚拟网卡,名字是 eth0:3 , 绑定的IP为 192.168.88.88
#增加路由表
route add -host 192.168.88.88 gw 192.168.220.133 代表,如果向192.168.88.88 发送数据,需要走的网管是 192.168.220.133