接下来关掉一些不必要的系统服务
chkconfig bluetooth off
chkconfig firstboot off
chkconfig cups off
chkconfig ip6tables off
chkconfig iptables off
chkconfig isdn off
chkconfig kudzu off
chkconfig sendmail off
chkconfig smartd off
chkconfig autofs off
service bluetooth stop
service firstboot stop
service cups stop
service ip6tables stop
service iptables stop
service isdn stop
service kudzu stop
service sendmail stop
service smartd stop
service autofs stop
服务器时间校对
# crontab -e
加入一行:
0 3 * * * /usr/sbin/ntpdate 210.72.145.44 > /dev/null 2>&1
第二步、安装软件
#cd /usr/local/src
#wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.24.tar.gz
#wget http://www.keepalived.org/software/keepalived-1.1.15.tar.gz
#ln -s /usr/src/kernels/2.6.18-194.el5-i686/ /usr/src/linux
#tar -zxvf ipvsadm-1.24.tar.gz
#cd ipvsadm-1.24
#make && make install
#cd ..
#tar -zxvf keepalived-1.1.15.tar.gz
# cd keepalived-1.1.15
#./configure
configure: error:
!!! OpenSSL is not properly installed on your system. !!!
!!! Can not include OpenSSL headers files.
解决办法:
# yum -y install openssl-devel
# ./configure && make && make install
编译的时候出现这个提示,说明keepalived和内核结合了,如果不是这样的,需要加上这个参数./configure --with-kernel-dir=/kernel/path
Keepalived configuration
------------------------
Keepalived version : 1.1.15
Compiler : gcc
Compiler flags : -g -O2
Extra Lib : -lpopt -lssl -lcrypto
Use IPVS Framework : Yes
IPVS sync daemon support : Yes
Use VRRP Framework : Yes
Use LinkWatch : No
Use Debug flags : No