日期:2014-05-16  浏览次数:20764 次

nginx配置 和linux多个ip
最近发现自己做的笔记很恶心,
nginx.conf结构为

...
events{}
http{
...
server{}
server{}
}


vim /etc/rc.local
/sbin/ifconfig eth0:1 192.168.76.130 broadcast 192.168.76.255 netmask 255.255.255.0 up
/sbin/ifconfig eth0:2 192.168.76.129 broadcast 192.168.76.255 netmask 255.255.255.0 up
/sbin/route add -host 192.168.76.130 dev eth0:1
/sbin/route add -host 192.168.76.129 dev eth0:2


yum search libjpeg
rpm -qa|grep libjpeg
yum install libjpeg-devel.x86_64
yum install libjpeg-devel.i386

linux内核参数优化
vim /etc/sysctl.conf

perl:
yum install perl*
perl -MCPAN -e 'install FCGI'
perl -MCPAN -e 'install FCGI::ProcManager'
vi /usr/local/bin/cgiwrap-fcgi.pl