安装keepalived
keepalived的官方网址是http://www.keepalived.org,可以在这里下载到各种版本的keepalived,这里下载的是keepalived-1.2.19.tar.gz。安装步骤如下:# mkdir src_soft
# cd src_soft/
# wget http://www.keepalived.org/software/keepalived-1.2.19.tar.gz
# tar xzvf keepalived-1.2.19.tar.gz
src_soft]# cd keepalived-1.2.19
# ./configure --prefix=/usr/local/keepalived --sysconf=/etc
configure: error:
!!! OpenSSL is not properly installed on your system. !!!
!!! Can not include OpenSSL headers files. !!!
解决方法:
# yum install openssl-devel
重新安装:
[root@dns keepalived-1.2.19]# ./configure --prefix=/usr/local/keepalived --sysconf=/etc
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
# make > make.20160403.log
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
# make install >install.20160403.log
http://blog.运维网.com/e/u261/themes/default/images/spacer.gif
# ln -s /usr/local/keepalived/sbin/keepalived /sbin/keepalived
--制作随机启动
# ln -s /etc/rc.d/init.d/keepalived/etc/rc.d/rc3.d/S100keepalived
在编译选项中,--sysconf指定了keepalived配置文件的安装路径,即路径为/etc/keepalived/keepalived.conf
--完成安装后,执行如下操作:
# keepalived --help
Usage: keepalived
-f, --use-file=FILE Use the specified configuration file
-P, --vrrp Only run with VRRP subsystem
-C, --check Only run with Health-checker subsystem
-l, --log-console Log messages to local console
-D, --log-detail Detailed log messages
-S, --log-facility= Set syslog facility to LOG_LOCAL
-X, --release-vips Drop VIP on transition from signal.
-V, --dont-release-vrrp Don't remove VRRP VIPs and VROUTEs on daemon stop
-I, --dont-release-ipvs Don't remove IPVS topology on daemon stop
-R, --dont-respawn Don't respawn child processes
-n, --dont-fork Don't fork the daemon process
-d, --dump-conf Dump the configuration data
-p, --pid=FILE Use specified pidfile for parent process
-r, --vrrp_pid=FILE Use specified pidfile for VRRP child process
-c, --checkers_pid=FILE Use specified pidfile for checkers child process
-v, --version Display the version number
-h, --help Display this help message
列出了keepalived各种用法,同时表明keepalived已安装成功。
页:
[1]