program development

keepalived installation tutorial

1. Install keepalived and visit Keepalived's official website (www.keepalived.org […]

article directories

1. Install keepalived
Visit Keepalived's official website (http://www.keepalived.org) to download the software package and upload it to the server.
Or directly use the command to download and extract:
[root@localhost ~]# tar zxvf keepalived-1.3.4.tar.gz
Install dependent plug-ins:

[root@localhost ~]# yum install -y gcc openssl-devel popt-devel

Compilation and installation:

[root@localhost ~]# cd keepalived-1.3.4

[root@localhost keepalived-1.3.4]# ./ configure –prefix=/usr/local/keepalived

[root@localhost keepalived-1.3.4]# make && make install

Configuration: (This will be described in detail in the later section, the default configuration will be used here)

Launch:
First, copy a few files into the CentOS7 environment:

[root@localhost ~]# cp keepalived-1.3.4/keepalived/etc/init.d/keepalived /etc/init.d/

[root@localhost ~]# mkdir /etc/keepalived

[root@localhost ~]# cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/

[root@localhost ~]# cp keepalived-1.3.4/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

[root@localhost ~]# cp /usr/local/keepalived/sbin/keepalived /usr/sbin/

Perform startup services:
[root@localhost ~]# service keepalived start