先安裝 corosync
http://echochio.pixnet.net/blog/post/39159709
apache 安裝設定部分
==================================================
crm node standby DRBD01
crm node online DRBD01
crm node standby DRBD02
crm node online DRBD02
==================================================
yum install httpd apache
vi /etc/httpd/conf/httpd.conf
---------------------------------------
find "Location"
===>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
---------------------------------------
crm configure property stonith-enabled=false
crm configure property no-quorum-policy=ignore
crm configure rsc_defaults resource-stickiness=100
crm configure primitive vip ocf:heartbeat:IPaddr2 params ip="192.168.15.199" cidr_netmask="32" op monitor interval="30s"
crm configure primitive website ocf:heartbeat:apache params configfile=/etc/httpd/conf/httpd.conf op monitor interval=30s
crm configure colocation web-ip 100: website vip
crm configure order web-after-ip inf: vip website
===================================================
node1 ==>
echo node1 > /var/www/html/index.html
node1 ==>
echo node2 > /var/www/html/index.html
==============================================
心得: stonith 不設定(false)
quorum 要忽略(ignore)
resource-stickiness 要設定
設IP設及apache服務,將其 colocation,設 order 。
留言列表