红旗linux高可用软件,[原]安装及配置红旗高可用服务器 HA 5.0 [4] – 运行集群

相继完成[原]安装及配置红旗高可用服务器 HA 5.0 [3] – 生成HA策略文件,剩下的工作就是把HA配置文件导入集群服务器中,并启动集群服务,让其托管应用。期间,需要在参与集群的服务器上安装集群软件和监控Agent、输入序列 、测试等。

六、安装集群服务套件

1、安装集群套件

分别在hatest1和hatest2上安装红旗 HA集群服务器软件:

[root@hatest1 ~]# rpm -ivh rfhacluster-5.0-3SE.i386.rpm

[root@hatest2 ~]# rpm -ivh rfhacluster-5.0-3SE.i386.rpm

2、安装监控Agent

根据应用选择安装监控Agent,这里的Agent用于监控httpd服务:

[root@hatest1 ~]# rpm -ivh rfhacluster-httpmon-5.0-1.i386.rpm

[root@hatest2 ~]# rpm -ivh rfhacluster-httpmon-5.0-1.i386.rpm

3、重启两服务器

必须重启服务器后,才能导入配置文件和输入序列 。

4、导入配置文件

把上面在Trekking Tool上生成的HA策略配置文件打包,然后上传到其中一台服务器上:

# tar cf – rfgz-httpd|(ssh 192.168.228.221 “tar xvf – -C /root/”)

在hatest1上导入配置文件:

(clpcfctrl可同时向集群中所有的服务器同步配置文件,但建议先关闭集群服务,然后再对配置文件改动)

引用

[root@hatest1 ~]# clpcfctrl –push -l -x rfgz-httpd/

Need to shutdown system and reboot

please shutdown system after push. (hit return) : y

file delivery to server 10.0.0.1 success.

file delivery to server 10.0.0.2 success.

success.(code:0)

5、注册序列

红旗HA产品可使用测试序列 进行测试,序列 请联系红旗获取。这里提供一个截止到20081231前的测试序列 ,使用前,请确认系统时间在20081231前。

引用

[root@hatest1 ~]# dos2unix 20080926_Trail_RedFlagHA50_SE50.key

dos2unix: converting file 20080926_Trail_RedFlagHA50_SE50.key to UNIX format …

[root@hatest1 ~]# clplcnsc -i 20080926_Trail_RedFlagHA50_SE50.key -P SE50

command was success.

[root@hatest1 ~]# dos2unix 20080926_Trail_RedFlagHA50_HTTPMON50.key

dos2unix: converting file 20080926_Trail_RedFlagHA50_HTTPMON50.key to UNIX format …

[root@hatest1 ~]# clplcnsc -i 20080926_Trail_RedFlagHA50_HTTPMON50.key -p HTTPMON50

command was success.

在hatest2上进行相同的注册序列 工作。

七、运行集群

至此,两集群服务器已配置完毕,下面进行启动、移动及关闭工作。

1、启动集群

在其中一台服务器上运行:

引用

[root@hatest1 ~]# clpcl -s -a

Start hatest1 : Success

Start hatest2 : Success

从hatest1日志可看到HA的运行过程显示:

引用

Dec 12 15:35:13 hatest1 rfhacluster: Cluster daemon has started properly…

Dec 12 15:35:33 hatest1 rfhacluster: Resource lanhb1 of server hatest1 up.

Dec 12 15:35:33 hatest1 rfhacluster: Resource lanhb2 of server hatest1 up.

Dec 12 15:35:33 hatest1 rfhacluster: Server hatest1 up.

Dec 12 15:35:33 hatest1 rfhacluster: Resource lanhb1 of server hatest2 up.

Dec 12 15:35:33 hatest1 rfhacluster: Resource lanhb2 of server hatest2 up.

Dec 12 15:35:33 hatest1 rfhacluster: Server hatest2 up.

Dec 12 15:35:38 hatest1 rfhacluster: Period of trial is till 2008/12/31. (SE50)

Dec 12 15:35:38 hatest1 rfhacluster: Monitor userw start.

Dec 12 15:35:39 hatest1 rfhacluster: The start processing of a group httpd started.

Dec 12 15:35:39 hatest1 rfhacluster: The start processing of a resource fip started.

Dec 12 15:35:39 hatest1 kernel: Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=90 sec (nowayout= 0)

Dec 12 15:35:42 hatest1 rfhacluster: The start processing of a resource fip ended.

Dec 12 15:35:42 hatest1 rfhacluster: The start processing of a resource disk started.

Dec 12 15:35:42 hatest1 kernel: kjournald starting.  Commit interval 5 seconds

Dec 12 15:35:42 hatest1 kernel: EXT3 FS on sdb1, internal journal

Dec 12 15:35:42 hatest1 kernel: EXT3-fs: mounted filesystem with ordered data mode.

Dec 12 15:35:43 hatest1 rfhacluster: The start processing of a resource disk ended.

Dec 12 15:35:43 hatest1 rfhacluster: The start processing of a resource exec started.

Dec 12 15:35:44 hatest1 httpd: httpd startup succeeded

Dec 12 15:35:46 hatest1 rfhacluster: The start processing of a resource exec ended.

Dec 12 15:35:46 hatest1 rfhacluster: The start processing of a resource monexec started.

Dec 12 15:35:47 hatest1 rfhacluster: Trial Period of clp_httpmon is till 12/31/2008 (mm/dd/yyyy).

Dec 12 15:35:49 hatest1 rfhacluster: Monitor pidw start.

Dec 12 15:35:49 hatest1 rfhacluster: The start processing of a resource monexec ended.

Dec 12 15:35:49 hatest1 rfhacluster: The start processing of a group httpd ended.

Dec 12 15:35:49 hatest1 rfhacluster: The clp_httpmon has started watching HTTP. [ID:httpwatch]

Dec 12 15:35:50 hatest1 rfhacluster: The clp_httpmon is going to watch HTTP daemon. [ID:httpwatch]

2、查看HA状态

可通过命令查看HA当前状态,及应用运行的服务器:

引用

[root@hatest1 ~]# clpstat

========================  CLUSTER STATUS  ===========================

Cluster : rfgz

*hatest1 ………: Online

lanhb1         : Normal           LAN Heartbeat

lanhb2         : Normal           LAN Heartbeat

hatest2 ………: Online

lanhb1         : Normal           LAN Heartbeat

lanhb2         : Normal           LAN Heartbeat

httpd ………..: Online           httpd Group

current        : hatest1

disk           : Online

exec           : Online

fip            : Online

monexec        : Online

miiw             : Normal

pidw             : Normal

userw            : Normal           user mode monitor

=====================================================================

3、参看应用运行情况

在客户端用浏览器访问 站页面:

文章知识点与官方知识档案匹配,可进一步学习相关知识CS入门技能树Linux入门在线安装软件25115 人正在系统学习中 相关资源:GHOST系统只剩C盘数据恢复软件_ghost分区丢失只剩c盘数据恢复…

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年4月6日
下一篇 2021年4月6日

相关推荐