欢迎来到天天文库
浏览记录
ID:37489108
大小:548.00 KB
页数:14页
时间:2019-05-24
《linux下自带双机服务heartbeat的配置》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、linux下自带双机服务heartbeat的配置首先要安装heartbeat服务所需要的补丁包,如果在你的linux系统下可以连接到外网,那么就可以使用云安装的形式其命令如下:yuminstallheartbeat-*这样的安装方法虽然简单但是会把一些不必要的补丁全部安装,要求必须可以连接到外网,还有一种方法就是先把heartbeat所需的补丁包全部下载到移动设备,再传送到需要安装的linux系统,可以使用如下命令来安装;rpm-ivhheartbeat-gui-2.1.3-3.el5.centos.i386.rpmrpm-ivhheartbeat-pils-
2、2.1.3-3.el5.centos.i386.rpmrpm-ivhheartbeat-stonith-2.1.3-3.el5.centos.i386.rpmrpm-ivhheartbeat-2.1.3-3.el5.centos.i386.rpmrpm-ivhheartbeat-devel-2.1.3-3.el5.centos.i386.rpm以上这几个包就是heartbeat服务所需要的补丁包,安装顺序也必须相同如有安装不上的包重复安装几次即可。其次在安装完所有的heartbeat补丁包后cp/usr/share/doc/heartbeat-2.1.3/ha
3、.cfharesourcesauthkeys/etc/ha.d/。配置以下文件/etc/ha.d/ha.cf##Therearelotsofoptionsinthisfile.Allyouhavetohaveisaset#ofnodeslisted{"node...}oneof{serial,bcast,mcast,orucast},#andavaluefor"auto_failback".##ATTENTION:Astheconfigurationfileisreadlinebyline,#THEORDEROFDIRECTIVEMATTERS!##Inpar
4、ticular,makesurethattheudpport,serialbaudrate#etc.aresetbeforetheheartbeatmediaaredefined!#debugandlogfiledirectivesgointoeffectwhenthey#areencountered.##Allwillbefineifyoukeepthemorderedasinthisexample.###Noteonlogging:#Ifanyofdebugfile,logfileandlogfacilityaredefinedthenthey#willb
5、eused.Ifdebugfileand/orlogfilearenotdefinedand#logfacilityisdefinedthentherespectivelogginganddebug#messageswillbelogedtosyslog.Iflogfacilityisnotdefined#thendebugfileandlogfilewillbeusedtologmessges.If#logfacilityisnotdefinedanddebugfileand/orlogfilearenot#definedthendefaultswillbe
6、usedfordebugfileandlogfileas#requiredandmessageswillbesentthere.##Filetowritedebugmessagesto#debugfile/var/log/ha-debug###Filetowriteothermessagesto#logfile/var/log/ha-log日志文件存放位置###Facilitytouseforsyslog()/logger#logfacilitylocal0###Anoteonspecifying"howlong"timesbelow...##Thedefau
7、lttimeunitisseconds#10meanstenseconds##Youcanalsospecifytheminmilliseconds#1500msmeans1.5seconds###keepalive:howlongbetweenheartbeats?#keepalive2指明心跳时间为2秒##deadtime:howlong-to-declare-host-dead?##Ifyousetthistoolowyouwillgettheproblematic#split-brain(orclusterpartition)problem.#Seet
8、heFAQforhowtousewar
此文档下载收益归作者所有