[原]安装及配置红旗高可用服务器 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前。

[原]安装及配置红旗高可用服务器 HA 5.0 [4] - 运行集群下载文件
点击这里下载文件

使用前,建议先用dos2unix规范一下其格式,在hatest1上注册:

引用
[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: <type: pm><event: 1> Cluster daemon has started properly…
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 3> Resource lanhb1 of server hatest1 up.
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 3> Resource lanhb2 of server hatest1 up.
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 1> Server hatest1 up.
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 3> Resource lanhb1 of server hatest2 up.
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 3> Resource lanhb2 of server hatest2 up.
Dec 12 15:35:33 hatest1 rfhacluster: <type: nm><event: 1> Server hatest2 up.
Dec 12 15:35:38 hatest1 rfhacluster: <type: rm><event: 51> Period of trial is till 2008/12/31. (SE50)
Dec 12 15:35:38 hatest1 rfhacluster: <type: rm><event: 1> Monitor userw start.
Dec 12 15:35:39 hatest1 rfhacluster: <type: rc><event: 10> The start processing of a group httpd started.
Dec 12 15:35:39 hatest1 rfhacluster: <type: rc><event: 30> 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: <type: rc><event: 31> The start processing of a resource fip ended.
Dec 12 15:35:42 hatest1 rfhacluster: <type: rc><event: 30> 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: <type: rc><event: 31> The start processing of a resource disk ended.
Dec 12 15:35:43 hatest1 rfhacluster: <type: rc><event: 30> 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: <type: rc><event: 31> The start processing of a resource exec ended.
Dec 12 15:35:46 hatest1 rfhacluster: <type: rc><event: 30> The start processing of a resource monexec started.
Dec 12 15:35:47 hatest1 rfhacluster: <type: httpmon><event: 52> Trial Period of clp_httpmon is till 12/31/2008 (mm/dd/yyyy).
Dec 12 15:35:49 hatest1 rfhacluster: <type: rm><event: 1> Monitor pidw start.
Dec 12 15:35:49 hatest1 rfhacluster: <type: rc><event: 31> The start processing of a resource monexec ended.
Dec 12 15:35:49 hatest1 rfhacluster: <type: rc><event: 11> The start processing of a group httpd ended.
Dec 12 15:35:49 hatest1 rfhacluster: <type: httpmon><event: 1> The clp_httpmon has started watching HTTP. [ID:httpwatch]
Dec 12 15:35:50 hatest1 rfhacluster: <type: httpmon><event: 2> The clp_httpmon is going to watch HTTP daemon. [ID:httpwatch]

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

引用
[root@hatest1 ~]# clpstat
========================  CLUSTER STATUS  ===========================
  Cluster : rfgz
  <server>
   *hatest1 ………: Online
      lanhb1         : Normal           LAN Heartbeat
      lanhb2         : Normal           LAN Heartbeat
    hatest2 ………: Online
      lanhb1         : Normal           LAN Heartbeat
      lanhb2         : Normal           LAN Heartbeat
  <group>
    httpd ………..: Online           httpd Group
      current        : hatest1
      disk           : Online
      exec           : Online
      fip            : Online
      monexec        : Online
  <monitor>
    miiw             : Normal
    pidw             : Normal
    userw            : Normal           user mode monitor
=====================================================================

3、参看应用运行情况
在客户端用浏览器访问网站页面:
点击在新窗口中浏览此图片 [原]安装及配置红旗高可用服务器 HA 5.0 [4] - 运行集群内文分页: [1] [2] [3]

使用SNMP监控Heartbeat状态
搭建Master-Master Mysql Replication 集群
红旗十周年用户大会——广州站(邀请函)
在Windows下使用红旗HA Cluster  配置工具
构建Heartbeat 3.0.3 GUI+DRBD+Oracle 10g 双机互备集群

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/111286.html

(0)
上一篇 2021年8月26日
下一篇 2021年8月26日

相关推荐

发表回复

登录后才能评论