Top

Keepalived-Install

源码安装Keepalived

我的环境是Centos7.4!

1. 安装相关依赖

[root@server ~]# yum install gcc-c++ popt popt-devel openssl openssl-devel libnfnetlink libnfnetlink-devel -y

2. 下载源码包并解压

[root@server ~]# cd /data/
[root@server data]# wget http://www.keepalived.org/software/keepalived-1.3.9.tar.gz
[root@server data]# tar -zxf keepalived-1.3.9.tar.gz
[root@server data]# cd keepalived-1.3.9

3. 安装

[root@server keepalived-1.3.9]# ./configure prefix=/usr/local/keepalived
[root@server keepalived-1.3.9]# make && make install
[root@server keepalived-1.3.9]# ln -s /usr/local/keepalived/bin/* /usr/bin/
[root@server keepalived]# ln -s /usr/local/keepalived/sbin/* /usr/sbin/
[root@client keepalived]# ln -s /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
[root@client keepalived]# ln -s /usr/local/keepalived/etc/keepalived/ /etc/
[root@server keepalived]# ln -s /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/