If you check the above test scenario and try to create DBs on any of the nodes, you would see that the data would automatically sync between the nodes. Which means Availability is achieved. Now to achieve high availability we will use HaProxy as the loadbalancer.
Set up another VM for this and install HAProxy as follows.
sudo apt-get update
sudo apt-get install haproxy
Edit HA Proxy Config as follows.
sudo vim /etc/haproxy/haproxy.cfg
Add the following lines. Continue reading “Setup HAProxy Load Balancer for MariaDB Galera Cluster” »
MariaDB Galera Cluster is a synchronous multi-master cluster for MariaDB with support for XtraDB/InnoDB storage engines. It has the following top features.
- It provides active-active multi-master topology
- You can read and write to any cluster node
- It has an automatic node joining
- Automatic membership control, failed nodes drop from the cluster
- Has true parallel replication, on row level
- Direct client connections
sudo apt update && sudo apt -y upgrade
Here’re the IP plans of my servers-
Continue reading “MariaDB Galera Cluster on Ubuntu 20” »
Secure the Server
Turn on automatic security updates.
$ sudo dpkg-reconfigure -plow unattended-upgrades
Setup a firewall with ufw.
$ sudo apt-get install ufw
$ sudo ufw default allow outgoing
$ sudo ufw default deny incoming
$ sudo ufw allow 22 comment 'SSH'
$ sudo ufw allow http comment 'HTTP'
$ sudo ufw allow https comment 'HTTPS'
$ sudo ufw enable
Install fail2ban to secure your server
$ sudo apt install fail2ban
Configure fail2ban to Use ufw
Copy the main configuration to avoid unexpected changes during package updates.
$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Edit the configuration file with your favorite text editor
$ sudo nano /etc/fail2ban/jail.local
Change the banaction and banaction_allports settings to ufw in the file /etc/fail2ban/jail.local as follows: Continue reading “Install Discourse on Ubuntu 20.04” »
The objective of this guide is to help you Install and Configure phpIPAM on Ubuntu 20.04/18.04 Linux distribution. phpIPAM is an open-source php-based web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. phpIPAM uses MySQL database backend and jQuery libraries, Ajax and HTML5/CSS3 features.
Install phpIPAM on Ubuntu 20.04/18.04
phpIPAM has a number of dependencies that we need to install before we can install and configure phpIPAM. These are:
- MySQL / MariaDB server
- php / php-fpm for nginx
- php modules
- Apache / nginx web server
- phpIPAM domain – ipam.example.com (should be replaced with your domain)
Continue reading “Install phpIPAM on Ubuntu 20.04/18.04” »
Boot Into GRUB menu
The first step is to reboot into the GRUB menu. If Ubuntu 18.04 Bionic Beaver is the only operating system installed you need to keep pressing SHIFT for the GRUB menu to show up.
Continue reading “Reset lost root password on Ubuntu 18.04/20.x” »
Step 1 – Installing Apache
Apache web server debian packages are available under the default repositories. Login to your Ubuntu system with sudo privileges account. Open a terminal and execute the following commands:
sudo apt update
sudo apt install apache2 libapache2-mod-fcgid
The above commands will install Apache and FastCGI module to your server.
Step 2 – Install PHP with FPM
Next, install PHP and PHP-FPM on your Ubuntu system. For this tutorial, we choose PHP 7.4 to install using
For the PHP installation we recommend to use ppa:ondrej/php PPA. Execute below couple of commands to add the PPA to your system.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
Then install PHP 7.4 (or required version) the latest version available on the day of writing this tutorial. Simply execute follows commands for the installation of PHP and PHP-FPM packages. Continue reading “Install LAMP with PHP-FPM on Ubuntu 20” »
First, it is recommended to update your system packages to the latest version. You can do it with the following command:
apt-get update -y
After updating all packages, install all the dependencies required for LibreNMS with the following command:
apt-get install rrdtool whois fping imagemagick graphviz mtr-tiny nmap python3-mysqldb snmp snmpd python3-pip python3-memcache mtr-tiny acl unzip git curl wget -y
Once all the dependencies are installed, you can proceed to the next step. Continue reading “Install LibreNMS Monitoring Tool with Nginx on Ubuntu 20.04” »