Simple failover cluster using UCARP on Ubuntu (Heartbeat Alternative) Rumi, January 24, 2016 In this tutorial, I’ll show you the steps to create a simple failover cluster on Ubuntu using CARP. To make the things meaningful,we’ll create the cluster for Apache service but you can use it for any other service, which relay on IP. Scenario: Here is my Setup: PrimarySrv: This is the main server, where I configured the apache and which act as Master (IP: 192.168.1.202) SecondarySrv: 2nd Apache Server where I configured the apache exactly like on PrimarySrv (IP : 192.168.1.203) 192.168.1.250 : Virtual IP address,created using Ucarp. Ucarp is really simple, it works like this,when the PrimarySrv is up,it will assign the virtual IP 192.168.1.250 to it, in case that PrimarySrv is down then it will assign virtual IP to the SeconadrySrv and when the PrimarySrv will come online, it will assign the virtual IP once again to it. I assume that you configured Apache server already according to the above scenario, Let’s test it for PrimarySrv: For SecondarySrv: Login to the servers and install Ucarp: sudo apt-get install ucarp Edit the file /etc/network/interfaces on PrimarySrv: sudo vi /etc/network/interfaces Change it according to your scenario: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.202 netmask 255.255.255.0 ####################### # ucarp configuration ####################### # vid : The ID of the virtual server [1-255] ucarp-vid 1 # vip : The virtual address ucarp-vip 192.168.1.250 # password : A password used to encrypt Carp communications ucarp-password secret # advskew : Advertisement skew [1-255] ucarp-advskew 1 # advbase : Interval in seconds that advertisements will occur ucarp-advbase 1 # master : determine if this server is the master ucarp-master yes # The carp network interface, on top of eth0 iface eth0:ucarp inet static address 192.168.1.250 netmask 255.255.255.0 Edit the file /etc/network/interfaces on SecondarySrv: sudo vi /etc/network/interfaces Change it according to your scenario: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.203 netmask 255.255.255.0 ######################### # ucarp configuration ######################### # vid : The ID of the virtual server [1-255] ucarp-vid 1 # vip : The virtual address ucarp-vip 192.168.1.250 # password : A password used to encrypt Carp communications ucarp-password secret # advskew : Advertisement skew [1-255] ucarp-advskew 100 # advbase : Interval in seconds that advertisements will occur ucarp-advbase 1 # master : determine if this server is the master ucarp-master no # The carp network interface, on top of eth0 iface eth0:ucarp inet static address 192.168.1.250 netmask 255.255.255.0 Restart the network service on both servers: sudo /etc/init.d/networking restart Check the IP configuration on both servers,you’ll see that the virtual IP(192.168.1.250) is assigned to the PrimarySrv: ifconfig At this moment, SecondarySrv don’t know about the virtual IP,we can verify it: ifconfig Now we access the apache web page in our web browser: www.apache-cluser.local Note: http://www.apache-cluster.local is equal to 192.168.1.250 Shutdown the PrimarySrv server: sudo poweroff Now,Ucarp assign the virtual IP (192.168.1.250) to the SecondarySrv server, let’s verify it: ifconfig Access the apache web page in web browser once again: www.apache-cluster.local Once the PrimarySrv will be online, it will take the virtual IP back once again. For configuring the synchronization between the servers, please refer this tutorial. Hope this will help you! Src: https://rbgeek.wordpress.com/2012/09/02/simple-failover-cluster-using-ucarp-on-ubuntu/ Related Administrations Configurations (Linux) HeartbeatHighAvailibilityUCARP
Boot CentOS 5/6 as Single User Mode August 3, 2014 Step 1 – Boot CentOS into Single User Mode – Hit Any Key Boot CentOS in Single User Mode – Press Any Key to Edit Boot Options Power up the machine and when you see this screen, hit the space bar or any other key before the timeout. Step 2… Read More
Increasing Attachment Size in Posfix July 19, 2019 Postfix by default restrict attachment size to approx 10MB i.e. 10240000 bytes. You can check it using following command: postconf | grep message_size_limit To change attachment-size to say 50 MB, run a command like: postconf -e message_size_limit=52428800 Note: If you are running a mail-server with SMTP/IMAP access, you need to change… Read More
Zimbra send http traffic to https or keeping both in mix June 10, 2018June 10, 2018 HTTP proxy can support protocol modes for HTTP or HTTPS only, both HTTP and HTTPS, mixed HTTP and HTTPS or HTTPS redirect from HTTP. Redirect is a popular configuration. This configuration must be made to the proxy servers. HTTPS redirect from HTTP zmprov ms proxy.server.name zimbraReverseProxyMailMode redirect HTTP and HTTPS… Read More