共计 1456 个字符,预计需要花费 4 分钟才能阅读完成。
Linux 系统:CentOS 6.4
环境说明:
[root@db html]# uname -a
Linux db 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@db html]# cat /etc/RedHat-release
CentOS release 6.4 (Final)
lvs 安装部署:
1、查看内核模块是否支持
lsmod | grep ip_vs #发现没有
2、安装
wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz
tar zxf ipvsadm-1.26.tar.gz
cd ipvsadm-1.26
yum -y install kernel-devel
ln -s /usr/src/kernels/2.6.32-431.17.1.el6.x86_64/ /usr/src/linux
make && make install
3、报错信息解决
报错:
make[1]: *** [libipvs.o] Error 1
make[1]: Leaving directory `/mnt/tools/ipvsadm-1.26/libipvs’
make: *** [libs] Error 2
解决:
yum -y install libnl* popt*
4、加载 ip_vs 模块
# 执行 ipvsadm 命令加载
ipvsadm
# 查看结果
[root@shell ~]# lsmod |grep ip_vs
ip_vs_rr 1420 1
ip_vs 115643 3 ip_vs_rr
libcrc32c 1246 1 ip_vs
ipv6 321422 137 ip_vs
keepalived 安装部署:
yum install openssl openssl-devel –y
yum install popt* -y
wget http://www.keepalived.org/software/keepalived-1.1.19.tar.gz
tar zxf keepalived-1.1.19.tar.gz
cd keepalived-1.1.19
#./configure && make && make install
./configure –sysconf=/etc && make && make install
/bin/cp /usr/local/sbin/keepalived /usr/sbin/
OK,上述步骤已经完成
CentOS 6.3 下 Haproxy+Keepalived+Apache 配置笔记 http://www.linuxidc.com/Linux/2013-06/85598.htm
Haproxy + KeepAlived 实现 WEB 群集 on CentOS 6 http://www.linuxidc.com/Linux/2012-03/55672.htm
Keepalived+Haproxy 配置高可用负载均衡 http://www.linuxidc.com/Linux/2012-03/56748.htm
Haproxy+Keepalived 构建高可用负载均衡 http://www.linuxidc.com/Linux/2012-03/55880.htm
更多 CentOS 相关信息见 CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14