Website Load Balancer

Photo Of People Doing Handshakes

Implementing High Availability for Apache Web Server with Pacemaker and Corosync

In today’s digital age, having a highly available web server is crucial for any organization. With the help of Pacemaker and Corosync, system administrators can set up a high availability (HA) cluster for their web server to ensure maximum uptime and minimal downtime. In this article, we will walk through the process of configuring an Apache web server to work with a Pacemaker and Corosync HA cluster, using advanced level command line examples. Prerequisites: Before we begin, we need to make sure that the following packages are installed on our Linux-based system: If any of these packages are not installed, we can use the following command to install them: Configuring Pacemaker and Corosync:First, we need to configure Pacemaker and Corosync to work together. We can do this by creating a Corosync configuration file: In this file, we will define the Pacemaker cluster name, the IP address of each node in the cluster, and other configuration options. Once we have saved the file, we can start the Corosync service: Next, we need to create a Pacemaker resource agent for Apache: In this file, we will define the start, stop, and monitor functions for the Apache resource agent. Once we have saved the file, we can start the Pacemaker service: Configuring the Apache Web Server:Now that Pacemaker and Corosync are set up, we need to configure Apache to work with them. We can do this by creating a configuration file for Apache: An example configuration file for Apache that can be used with Pacemaker and Corosync: In this file, we will define the virtual IP address that will be used by the HA cluster. We can also define any other configuration options for Apache that we need. Once we have saved the file, we can restart the Apache service: Testing the HA Cluster:Now that everything is set up, we can test the HA cluster to make sure it is working properly. We can do this by stopping the Apache service on one node and verifying that the other node takes over: We can then check the status of the Pacemaker cluster to make sure that the other node has taken over: Conclusion:In this article, we have seen how to configure an Apache web server with Pacemaker and Corosync HA cluster. By following these steps, system administrators can ensure maximum uptime and minimal downtime for their web server. YouTube channel: https://www.youtube.com/@trainbrain007

Implementing High Availability for Apache Web Server with Pacemaker and Corosync Read More »

Side view of anonymous ethnic female freelancer working on netbook at wooden table in town

Why Important to Keep Linux Server Updated

Keeping your server updated is an essential task for any system administrator. By installing security updates, bug fixes, and patches, you can help ensure the security and stability of your server. In this blog post, we’ll cover why it’s important to keep your server updated and some best practices to follow. Why Is It Important to Keep Linux Server Updated? There are several reasons why it’s important to keep your server updated: Best Practices for Keeping Your Server Updated Here are some best practices to follow when keeping your server updated: To ensure that your server is always up-to-date, you should set up automatic updates. Most Linux distributions come with built-in tools for automatic updates, such as Yum or Apt-Get. You can configure these tools to automatically download and install updates as soon as they become available. Before installing updates on your production server, you should test them on a development or staging server. This will help you identify any issues that may arise from the updates, such as compatibility issues with other software or configuration changes. Before installing updates, you should always check the release notes and changelogs. These documents provide information about the changes and bug fixes included in the updates, which can help you identify any potential issues. Some updates may require a server reboot or cause temporary downtime. To minimize the impact on your users, you should schedule downtime for updates during off-peak hours. Although updates are designed to improve your server, they can sometimes cause issues or data loss. To protect your data, you should keep regular backups of your server. This will allow you to quickly recover from any issues that may arise. In conclusion, keeping your server updated is an essential task for any system administrator. By installing security updates, bug fixes, and patches, you can help ensure the security, stability, and performance of your server. By following these best practices, you can ensure that your server is always up-to-date and running smoothly. Want to Hire a System Administrator? Please Contact: LinkedIn +971 5280 19445 +880 1911 343443 YouTube channel: https://www.youtube.com/@trainbrain007

Why Important to Keep Linux Server Updated Read More »

Man in Black Shirt Sits Behind Desk With Computers

Extend Linux root partition

This article lead you How to Extend Linux root Partition [root@62 ~]# parted /dev/sda GNU Parted 3.1 Using /dev/sda Welcome to GNU Parted! Type ‘help’ to view a list of commands. (parted) print Model: QEMU QEMU HARDDISK (scsi) Disk /dev/sda: 215GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags1 1049kB 1075MB 1074MB primary xfs boot2 1075MB 107GB 106GB primary lvm resizepart 2 100% print (parted) resizepart 2 100% (parted) print Model: QEMU QEMU HARDDISK (scsi) Disk /dev/sda: 215GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags1 1049kB 1075MB 1074MB primary xfs boot2 1075MB 215GB 214GB primary lvm (parted) quitInformation: You may need to update /etc/fstab. Show current disk at VM [root@62 ~]# df -h Filesystem Size Used Avail Use% Mounted ondevtmpfs 2.8G 0 2.8G 0% /devtmpfs 2.8G 0 2.8G 0% /dev/shmtmpfs 2.8G 273M 2.6G 10% /runtmpfs 2.8G 0 2.8G 0% /sys/fs/cgroup/dev/mapper/centos-root 93G 7.1G 86G 8% //dev/sda1 1014M 150M 865M 15% /boot/dev/loop0 3.9G 8.4M 3.7G 1% /tmptmpfs 571M 0 571M 0% /run/user/0 show current Phisycal Volume [root@62 ~]# pvdisplay — Physical volume — PV Name /dev/sda2 VG Name centos PV Size <98.76 GiB / not usable 3.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 25281 Free PE 1 Allocated PE 25280 PV UUID lQWYWH-bMEf-QHpS-xEej-B9G0-su0v-Vj8as7 Resize Phisycal Volume [root@62 ~]# pvresize /dev/sda2 Physical volume “/dev/sda2” changed 1 physical volume(s) resized or updated / 0 physical volume(s) not resized [root@62 ~]# pvdisplay — Physical volume — PV Name /dev/sda2 VG Name centos PV Size <199.00 GiB / not usable 2.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 50943 Free PE 25663 Allocated PE 25280 PV UUID lQWYWH-bMEf-QHpS-xEej-B9G0-su0v-Vj8as7 Resize Logical Volume [root@62 ~]# lvresize –extents +100%FREE –resizefs /dev/centos/root Size of logical volume centos/root changed from 93.00 GiB (23808 extents) to <193.25 GiB (49471 extents). Logical volume centos/root successfully resized. meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=6094848 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0 data = bsize=4096 blocks=24379392, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=11904, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 24379392 to 50658304 Now check the updated extended disk space using this command.show current disk [root@62 ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtmpfs 2.8G 0 2.8G 0% /dev tmpfs tmpfs 2.8G 0 2.8G 0% /dev/shm tmpfs tmpfs 2.8G 273M 2.6G 10% /run tmpfs tmpfs 2.8G 0 2.8G 0% /sys/fs/cgroup /dev/mapper/centos-root xfs 194G 7.1G 187G 4% / /dev/sda1 xfs 1014M 150M 865M 15% /boot /dev/loop0 ext4 3.9G 8.4M 3.7G 1% /tmp tmpfs tmpfs 571M 0 571M 0% /run/user/0 disk partition centos-root mapper now changed from 400 GB to 800 GB !!! Yahoo! You can watch this video tutorial for better understand.

Extend Linux root partition Read More »

Scroll to Top