nginx+keepalive

1.安装keepalive

#wget  http://syslab.comsenz.com/downloads/linux/keepalived-1.2.1.tar.gz

tar zxvf keepalived-1.2.7.tar.gz
cd keepalived-1.2.7
在此之前。请安装一下一些简单的工具 
yum install -y gcc openssl-devel popt-devel
不然会编译不成功的。

然后
./configure
make && make install

cp /usr/local/etc/rc.d/init.d/keepalived /etc/init.d/
cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
chmod +x /etc/init.d/keepalived
chkconfig --add keepalived
chkconfig keepalived on
mkdir /etc/keepalived
ln -s /usr/local/sbin/keepalived /usr/sbin/

 

2.安装nginx

#wget http://syslab.comsenz.com/downloads/linux/nginx-1.1.5.tar.gz


nginx-1.2.5.tar.gz
tar zxvf  nginx-1.2.5.tar.gz
cd nginx-1.2.5
安装一下相关组件.
yum install -y pcre-devel
./configure --prefix=/usr/local/nginx --user=www --group=www  --with-http_stub_status_module --with-http_ssl_module
make && make install

你可能感兴趣的:(nginx+keepalive)