keepalive官方下載路徑:http://keepalived.org/download.html
復制鏈接具练,下載當前最新版本
wget?http://keepalived.org/software/keepalived-2.0.2.tar.gz
tar -xf?keepalived-2.0.2.tar.gz
cd?keepalived-2.0.2
#指定路徑為/usr/local/keepalived
mkdir -p /usr/local/keepalived
#執(zhí)行configure
報錯1
configure: error: no acceptable C compiler found in $PATH
這是因為gcc沒有安裝:yum install gcc -y
報錯2
!!! OpenSSL is not properly installed on your system. !!!
對openssl進行安裝:yum install openssl openssl-devel -y
configure完成后袁铐,執(zhí)行
make && make install
修改環(huán)境變量
echo "export PATH=\$PATH:/usr/local/keepalived/sbin" >> /etc/profile
(如果系統(tǒng)里本來有keepalive了,那么需要把keepalive的路徑寫到$PATH前面屎鳍,否則不會默認調用新安裝的keepalived)
#部署py腳本
rpm -ivh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y MySQL-python (MySQL一定要注意大小寫李请,否則該語句無法執(zhí)行成功)