Centos7安装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

你可能感兴趣的:(Centos7安装heartbeat)