![](https://csdnimg.cn/release/download_crawler_static/87203734/bg3.jpg)
五. 安装软件
1. 更新 yum 源(将 yum 源替换成中国科大的 yum 源或 mirrors 的源)
# cd /etc/yum.repos.d'
# 进入 yum 源目录
# mv CentOS-Base.repo{,.bak}
# 修改默认网络源的名字使其不生效
# wget http://docs.linuxtone.org/soft/lemp/CentOs-Base.repo
# 下载中科大源
# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
# 下载 mirrors-163 源
# wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
# 下载 mirrors-sohu 源
注意:三个源任选一个就好.我是使用 163 的
2. Yum 安装 ipvsadm / heartbeat / net-snmp
###############Yum#############
# yum install ipvsadm # 安装 LVS
# yum install heartbeat* # 安装 heartbeat 时会自动解决依赖关系
# yum install net-snmp # 安装 net-snmp
3. 安装 heartbeat
yum 安装 heartbeat 会出现这个错误:
不用理他,在用 yum 安装一次 就处理好了
以下列出 heartbeat 所依赖的包名如果使用 rpm 方式安装可以参考|红色|是安装包|绿色|是依赖