Project 3 - CameronProvost/SEC440 GitHub Wiki
Web Application and Database Redundancy
U1, U2 & U3 Configuration
Sudo adduser cameron
Sudo usermod -aG sudo cameron
Sudo hostnamectl set-hostname u1-cameron
Sudo nano /etc/netplan/00-installer-config.yaml
U1
U2
U3
Sudo netplan apply
Reboot
Galera Installion and Configuration
sudo apt update
sudo apt install mariadb-server mariadb-client galera-4 rsync -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo nano /etc/mysql/mariadb.conf.d/60-galera.cnf
U1
U2
U3
Firewall Rules
sudo ufw allow 3306/tcp # MySQL/MariaDB
sudo ufw allow 4444/tcp # Galera replication
sudo ufw allow 4567/tcp # Galera communication
sudo ufw allow 4568/tcp # Galera IST (incremental state transfer)
sudo ufw allow 22/tcp # SSH
sudo ufw reload
Initialize The Cluster
On U1
sudo systemctl stop mariadb
sudo galera_new_cluster
On U2 & U3
sudo systemctl stop mariadb
sudo systemctl start mariadb
Test Cluster
Sudo mysql -u root -p
Show status like ‘wsrep_cluser_size’;
Secure The Databases
sudo mysql_secure_installation