Squid Proxy Server with Clustering using Corosync, Pacemaker and PCS
Aim: Set up a squid proxy server in clustered environment using pacemaker, corosync and PCS. You can use this for other cluster setups like Httpd also. Requirements: Get two servers with similar OS and configs. My setup is on CentOS 7.4 minimal install Squid on node1 - xx.xx.xx.80 Squid on node2 - xx.xx.xx.137 Cluster IP1 : xx.xx.xx.89 Cluster IP2 : xx.xx.xx.142 Steps 1 to 9 to be run on all cluster servers - node1, node2 1) Install the corosync, pacemaker and pcs # yum install -y corosync pcs pacemaker 2) Disable selinux nano /etc/sysconfig/selinux and change it to disabledas below SELINUX=disabled 3) Add required firewall rules to permit all required connections. firewall-cmd --permanent --zone=internal --change-interface=ifcfg-ens160 //change the nic in to public to internal zone firewall-cmd --zone=internal --add-service=ssh --permanent firewall-cmd --zone=internal --add-service=http --permanent firewall-cmd --zone=internal --add-service=https ...