1.下载安装ipvs安装包,进行解压
http://www.keepalived.org/software/
2.创建安装路径连接
安装环境: yum -y install openssl-devel
进入命令: cd /usr/local/install/keepalived
创建安装: ./configure --prefix=/usr/local/install/keepalived/ --disable-fwmark
编译安装: make && make install
可能出现的错误:
修改resolv文件:
命令: vim /etc/resolv.conf
内容: nameserver 8.8.8.8
3.验证安装
进入命令: cd /usr/local/install/keepalived/sbin && ll
启动命令: ./keepalived
查看进程命令: ps -ef | grep keepalived
查看ipvs 是否启动
命令: lsmod | grep ip_vs
4.查看日志:
tail -f /var/log/messages
5.关闭keepalived
pkill keepalived