1. 程式人生 > >keepalived 安裝

keepalived 安裝

keepalived

一. 編譯安裝keepalived

1.1 keepalived的源碼獲取

keepalived源碼包我們可以到keepalived的官網:http://www.keepalived.org/去下載,

相關說明文檔亦可在其官網查看,比如keepalived的使用,相關配置說明,這裏演示的版本為:1.3.5

# wget http://www.keepalived.org/software/keepalived-1.3.5.tar.gz

1.2 安裝keepalived的依賴包

下載後keepalived源碼包後,我們還需要安裝keepalived依賴的依賴包,比如:openssl , popt

# yum install openssl openssl-devel popt popt-devel

1.3 編譯,安裝keepalived

<--編譯安裝keepalived-->

# tar zxvf keepalived-1.3.5.tar.gz

# cd /data/keepalived-1.3.5/

# ./configure \

--prefix=/data/keepalived \

--sbindir=/data/keepalived/sbin

# make

# make install

<--對keepalived進行相關優化-->

<---拷貝keepalived相關啟動命令--->

cp /data/keepalived/keepalived/etc/init.d/keepalived /etc/init.d/

cp /data/keepalived/bin/keepalived /usr/sbin/

cp /data/keepalived/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

mkdir -p /etc/keepalived/

cp /data/keepalived/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf

二:啟動keepalived服務

# service keepalived start

如果keepalived已經啟動,這時我們就可以查看以下命令查看啟動情況:

# service keepalived status

# ps aux | grep keepalived


本文出自 “夢Dream” 博客,請務必保留此出處http://dreamy.blog.51cto.com/12471447/1944401

keepalived 安裝