ThisisGoogle'scacheofhttp://www.alexlinux.com/pacemakercorosyncnginxcluster/.
Itisasnapshotofthe
pageasitappearedon28May201607:36:02GMT.
Thecurrentpagecouldhavechangedinthemeantime.Learnmore
Fullversion
Textonlyversion
Viewsource
Tip:Toquicklyfindyoursearchtermonthispage,pressCtrl+ForF(Mac)andusethefindbar.
pacemaker corosync nginx cluster
Disable SELINUX
Disable IPv6
Pacemaker installation
[alex@test01~]$sudoyuminstallcorosyncpcspacemakernginx
[alex@test02~]$sudoyuminstallcorosyncpcspacemakernginx
Enable autostart
[alex@test01~]$systemctlenablepcsdsystemctlenablecorosyncsystemctlenable
pacemaker
[alex@test02~]$systemctlenablepcsdsystemctlenablecorosyncsystemctlenable
pacemaker
Start pacemaker
[alex@test01~]$systemctlstartpcsd
[alex@test02~]$systemctlstartpcsd
Add nginx as cluster resource:
[alex@test01~]$cd/usr/lib/ocf/resource.d/heartbeat
[alex@test01~]$wgethttps://raw.githubusercontent.com/ClusterLabs/resource
agents/master/heartbeat/nginx
[alex@test01~]$chmod755nginx
[alex@test02~]$cd/usr/lib/ocf/resource.d/heartbeat
[alex@test02~]$wgethttps://raw.githubusercontent.com/ClusterLabs/resource
agents/master/heartbeat/nginx
[alex@test02~]$chmod755nginx
Set password
[alex@test01~]$sudopasswdhacluster
[alex@test02~]$sudopasswdhacluster
Authenti cate nodes:
[alex@test01~]$sudopcsclusterauthtest01test02
Setup and start cluster
[alex@test01~]$sudopcsclustersetupnamecluster_webtest01test02
[alex@test01~]$systemctlstartpacemakersystemctlstartcorosync
[alex@test02~]$systemctlstartpacemakersystemctlstartcorosync
[alex@test01~]$sudopcsclusterstartall
Disable STONITH
[alex@test01~]$sudopcspropertysetstonithenabled=false
[alex@test01~]$sudopcspropertysetnoquorumpolicy=ignore
Add cluster ip address
[alex@test01~]$sudopcsresourcecreatevirtual_ipocf:heartbeat:IPaddr2ip=10.1.1.10
cidr_netmask=32opmonitorinterval=30s
Create web server resource:
[alex@test01~]$sudopcsresourcecreatewebserverocf:heartbeat:nginx
configfile=/etc/nginx/nginx.confopmonitortimeout="5s"interval="5s"
Add rules:
[alex@test01~]$sudopcsconstraintcolocationaddwebservervirtual_ipINFINITY
[alex@test01~]$sudopcsconstraintordervirtual_ipthenwebserver
[alex@test01~]$sudopcsconstraintlocationwebserverpreferstest01=50
[alex@test01~]$sudopcsclusterstopall&&sudopcsclusterstartall
troubleshooting
[alex@test01~]$sudopcsstatusnodes
[alex@test01~]$sudocorosynccmapctl|grepmembers
[alex@test01~]$sudopcsstatuscorosync
[alex@test01~]$sudocrm_verifyLV
[alex@test01~]$sudopcsstatuscluster
This entry was posted in install tutorial on October 21, 2015 [http://www.alexlinux.com/pacemakercorosync-nginx-cluster/] .