wget http://www.keepalived.org/software/keepalived-1.1.19.tar.gz
tar zxvf keepalived-1.1.19.tar.gz
cd keepalived-1.1.19
./configure --prefix=/usr/local/keepalived
make
make install
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
mkdir /etc/keepalived
cd /etc/keepalived/
执行 /etc/rc.d/init.d/keepalived start 启动keepalived后, 执行ip a, 你将看到类似的信息:
[iyunv@node1 ~]# ip a
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:01:11:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.200.128/24 brd 192.168.200.255 scope global eth0
inet 192.168.200.100/32 scope global eth0
inet 192.168.200.200/32 scope global eth0
inet6 fe80::20c:29ff:fe01:112a/64 scope link
[iyunv@node1 ~]# ip a
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:01:11:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.200.128/24 brd 192.168.200.255 scope global eth0
inet 192.168.200.100/32 scope global eth0
inet6 fe80::20c:29ff:fe01:112a/64 scope link
[iyunv@node1 ~]# ip a
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:01:11:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.200.128/24 brd 192.168.200.255 scope global eth0
inet 192.168.200.100/32 scope global eth0
inet 192.168.200.200/32 scope global eth0
inet6 fe80::20c:29ff:fe01:112a/64 scope link
3、编译安装Nginx
wget http://sysoev.ru/nginx/nginx-0.7.64.tar.gz
tar zxvf nginx-0.7.64.tar.gz
cd nginx-0.7.64/
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_flv_module
make && make install
cd ../