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
How to import a certificate into WorldClient December 21, 2020 WorldClient’s web server currently does not support generating certificate requests. If you have IIS you can use its certificate wizard to create the request and import the response. WorldClient will then be able to use it. You do not need to continue to use IIS at that point, you can disable… Read More
Install XRDP in Debian 9 August 8, 2018 Install XRDP and TigerVNC server $ sudo apt install -y xrdp tigervnc-standalone-server Connect XRDP from Windows 10 Windows start button -> Windows Accesssories -> Remote Desktop Connection Input FQDN or IP address of XRDP server and connect to XRDP. XRDP RDP terminal will appear. Select “XVNC” Session and connect. … Read More
Connecting to Autonomous DB Without a Wallet (Using TLS) November 10, 2023 Enable TLS Log in to the Oracle Cloud console and select your ADB instance to view the instance details. In the details, find the section titled ‘Network’ and click on ‘Edit’ next to ‘Access Control List’. In the ‘Edit Access Control List’ dialog, choose the type of entry that you’d… Read More