Centos7安装heartbeat

两台机器测试的话配置的前提
		关闭防火墙和selinux
		两台机能基于主机名进行互相ip解析,即修改hosts文件
		两台机能基于主机名进行ssh无密码登陆,ssh-keygen和ssh-copy-id
		两台机时间同步,如用ntpdate命令同步同一个时间服务器
安装heartbeat步骤如下
http://linux-ha.org/wiki/Download		安装包包的下载地址
		yum -y install gcc gcc-c++ autoconf automake libtool glib2-devel libxml2-devel bzip2 bzip2-devel e2fsprogs-devel libxslt-devel libtool-ltdl-devel asciidoc
		yum -y install psmisc			不安装的话,后面配置文件中配置自动挂载时会报错(Setup problem: couldn't find command: fuser)
		yum -y install net-tools			不装在haresources使用IPaddr会报错
		groupadd haclient
		useradd -g haclient hacluster
		tar xf 0a7add1d9996.tar.bz2
		cd Reusable-Cluster-Components-glue--0a7add1d9996/
		 ./autogen.sh
		 ./configure --prefix=/usr/local/heartbeat --with-daemon-user=hacluster --with-daemon-group=haclient --enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1' 
		make && make install
		cd
		tar xf resource-agents-3.9.6.tar.gz
		cd resource-agents-3.9.6/
		./autogen.sh 
		./configure --prefix=/usr/local/heartbeat --with-daemon-user=hacluster --with-daemon-group=haclient --enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
		make && make install
		cd
		tar xf 958e11be8686.tar.bz2 
		cd Heartbeat-3-0-958e11be8686/
		 ./bootstrap 
		export CFLAGS="$CFLAGS -I/usr/local/heartbeat/include -L/usr/local/heartbeat/lib"
		./configure --prefix=/usr/local/heartbeat --with-daemon-user=hacluster --with-daemon-group=haclient --enable-fatal-warnings=no LIBS='/lib64/libuuid.so.1'
		make && make install
		cp doc/{ha.cf,haresources,authkeys} /usr/local/heartbeat/etc/ha.d/
		chmod 600 /usr/local/heartbeat/etc/ha.d/authkeys
		mkdir -pv /usr/local/heartbeat/usr/lib/ocf/lib/heartbeat/
		cp /usr/lib/ocf/lib/heartbeat/ocf-* /usr/local/heartbeat/usr/lib/ocf/lib/heartbeat/
		ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/RAExec/* /usr/local/heartbeat/lib/heartbeat/plugins/RAExec/
		ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/* /usr/local/heartbeat/lib/heartbeat/plugins/
		定义配置文件后再启动(配置文件目录为/usr/local/heartbeat/etc/ha.d/)
		chkconfig --add heartbeat
		systemctl start heartbeat.service
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值