nginx+keepalived安装配置
下载依赖
yum -y install gcc pcre-devel zlib-devel openssl-devel
下载nginx
wget http://nginx.org/download/nginx-1.7.12.tar.gz
解压 tar -zxvf nginx-1.7.12.tar.gz cd nginx-1.7.12
./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --error-log-path=/usr/local/nginx/log/nginx_error.log --http-log-path=/usr/local/nginx/log/nginx_access.log --pid-path=/usr/local/nginx/log/nginx.pid --with-http_stub_status_module make make install
设置nginx为系统服务开机启动 http://www.cnblogs.com/sflik/p/4409748
------------------------------------------------------------------分割线-----------------------------------------------------------------
keeplived下载
wget http://www.keepalived.org/software/keepalived-1.2.16.tar.gz
解压
tar -zxvf keepalived-1.2.16.tar.gz cd keepalived-1.2.16
配置
./configure --profix=/usr/local/keepalived make make install cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/keepalived
vim /etc/init.d/keepalived
vim /usr/local/keepalived/etc/sysconfig/keepalived
chkconfig keepalived on
测试:
service keepalived restart