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