heartbeat 安裝以及常見錯誤解決

heartbeat 安裝

博客分類: Linux
 
創建用戶組
heartbeat需要haclient用戶組和hacluster用戶。
兩個節點做同樣的操作,並保證haclient和hacluster的ID一樣。
 
Java代碼  
groupadd haclient  
useradd -g haclient hacluster  
 
1.Cluster 安裝
 
Java代碼  
wget http://hg.linux-ha.org/glue/archive/glue-1.0.7.tar.bz2  
tar -vxjf glue-1.0.7.tar.bz2   
cd Reusable-Cluster-Components-glue--glue-1.0.7  
  
./autogen.sh  
 可能需要安裝的:
 
Java代碼  
yum install autoconf  
yum install automake  
yum install libtool  
可能碰到的問題:
libtoolize: `COPYING.LIB' not found in `/usr/share/libtool/libltdl'
將別的機器的libltdl copy到相應目錄,否則在make時可能會出現
 
Making all in libltdl
gmake[1]: Entering directory `/soft/Reusable-Cluster-Components-glue--glue-1.0.7/libltdl'
gmake[1]: *** No rule to make target `all'.  Stop.
gmake[1]: Leaving directory `/soft/Reusable-Cluster-Components-glue--glue-1.0.7/libltdl'
make: *** [all-recursive] Error 1
出現上述錯誤後,刪除已經編譯的文件夾,然後copy上述文件,再執行以上操作
Java代碼  
./configure --prefix=/usr --sysconfdir=/etc  
 可能碰到的問題:
 
問題:configure: error: libxml2 config not found 
rpm -qa|grep libxml
解決:yum install libxml2 libxml2-devel
 
問題:configure: error: BZ2 libraries not found
解決:yum -y install bzip2-devel glib2-devel
 
 
Java代碼  
make  
 可能碰到的問題:
 
問題:
lib/pils/.libs/libpils.so -lbz2 -lxml2 -lc -lrt -ldl -lglib-2.0 -lltdl
./.libs/libplumb.so: undefined reference to `uuid_parse'
./.libs/libplumb.so: undefined reference to `uuid_generate'
./.libs/libplumb.so: undefined reference to `uuid_copy'
./.libs/libplumb.so: undefined reference to `uuid_is_null'
./.libs/libplumb.so: undefined reference to `uuid_unparse'
./.libs/libplumb.so: undefined reference to `uuid_clear'
./.libs/libplumb.so: undefined reference to `uuid_compare'
collect2: ld returned 1 exit status
gmake[2]: *** [ipctest] Error 1
解決:yum install e2fsprogs-devel libuuid-devel
 
問題:
error : Operation in progress
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl"
compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 46 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/html/formal.xsl
http://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1: parser error : Document is empty
 
^
http://docbook.sourceforge.net/release/xsl/current/html/table.xsl:1: parser error : Start tag expected, '<' not found
 
^
compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 47 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/html/table.xsl
解決:我懷疑是需要下載的文件比較多,而水管的速度很不給力,所以我是下載了這些xsl文件,然後在本機架設了一個webserver,通過設置host訪問局域網的機器
 
Java代碼  
sudo make install  
2.heartbeat安裝
 
Java代碼  
wget http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/STABLE-3.0.4.tar.bz2  
tar -vxjf STABLE-3.0.4.tar.bz2  
cd Heartbeat-3-0-STABLE-3.0.4/  
./bootstrap  
./ConfigureMe configure --prefix=/usr --sysconfdir=/etc  
make  
sudo make install  
可能遇到的問題:
 問題:Starting High-Availability services: /etc/ha.d/resource.d//hto-mapfuncs: line 35: 
 
/usr/lib/ocf/resource.d//heartbeat/.ocf-shellfuncs: No such file or directory Done.
解決:cp /etc/ha.d/shellfuncs /usr/lib/ocf/resource.d//heartbeat/.ocf-shellfuncs
 
缺少.ocf-directories .ocf-returncodes .ocf-binaries
解決:
 
Java代碼  
cd /usr/lib/ocf/lib/heartbeat  
cp ocf-directories .ocf-directories  
cp ocf-returncodes .ocf-returncodes  
cp ocf-binaries .ocf-binaries  
 
 
3.agents 安裝
 
Java代碼  
wget https://github.com/ClusterLabs/resource-agents/tarball/agents-1.0.4 --no-check-certificate  
mv agents-1.0.4 agents-1.0.4.tar.gz  
tar xvf agents-1.0.4.tar.gz  
cd ClusterLabs-resource-agents-c06b6f3/  
./autogen.sh  
./configure --prefix=/usr --sysconfdir=/etc  
make  
sudo make install  
 
 需要執行的操作:
 
Java代碼  
chmod 600 /etc/ha.d/authkeys  
 
 
Java代碼  
chkconfig --add heartbeat  
chkconfig heartbeat on  
chkconfig httpd off  
 一些監控代碼:
 
Java代碼  
netstat -nupl |grep 694  
  
tail -f /var/log/ha/ha-debug  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章