HACMP 5.x 完全手册,第 2 部分:配置
2008-11-13 10:57:40 来源:WEB开发网修改 /etc/hosts
修改并确认每台机器的 /etc/hosts 文件为 :
127.0.0.1 loopback localhost # loopback (lo0) name/address
10.2.2.1 host1_l2_boot1 host1
10.2.1.1 host1_l1_boot1
10.2.200.1 host1_l2_svc
10.2.100.1 host1_l1_svc1
10.2.101.1 host1_l1_svc2
10.2.12.1 host1_l2_boot2
10.2.11.1 host1_l1_boot2
10.2.2.2 host2_l2_boot1 host2
10.2.1.2 host2_l1_boot1
10.2.200.2 host2_l2_svc
10.2.100.2 host2_l1_svc1
10.2.101.2 host2_l1_svc2
10.2.12.2 host2_l2_boot2
10.2.11.2 host2_l1_boot2
注: 正式配置之前,主机名落在 boot IP 地址上,待配置完成后将改为服务 IP 地址上。
编写初步启停脚本
mkdir -p /usr/sbin/cluster/app/log
[host1][root][/usr/sbin/cluster/app]>ls
start_host1 start_host2 stop_host1 stop_host2
#start_host1
banner start host1
route delete 0
route add 0 10.2.200.254
banner end host1
exit 0
# stop_host1
banner stop host1
banner end host1
exit 0
# start_host2
banner start host2
route delete 0
route add 0 10.2.200.254
banner end start host2
#stop_host2
banner stop host2
banner end host2
exit 0
编写完成后复制到另一节点上:
[host1][root][/usr/sbin/cluster]>rcp -rp app host2:/usr/sbin/cluster
更多精彩
赞助商链接