Project 3 - Web Application and Database Redundancy
Last updated
Last updated
Setup u1, u2, u3
‘’’
sudo hostnamectl set-hostname db0X-paul
sudo passwd champuser
sudo adduser paul
sudo usermod -aG sudo paul
‘’’
Setup networking
‘’’
sudo nano /etc/netplan/00-installer-config.yaml
‘’’
Setup MariaDB with Galera Cluster
‘’’
Sudo apt install mariadb-server
‘’’
Edit the Galera Config
‘’’
Sudo nano /etc/mysql/mariadb.conf.d/60-galera.cnf
‘’’
Resources:
https://www.server-world.info/en/note?os=Ubuntu_22.04&p=mariadb&f=1
https://www.linuxbabe.com/mariadb/galera-cluster-ubuntu
Update ha proxy to support db:
‘’’
Sudo nano /etc/haproxy/haproxy.cfg
‘’’
Now restart haproxy
Now check if lan can connect the database
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
Make Database:
CREATE DATABASE futurama;
USE futurama;
WEB:
Yum install php php-mysql mysql
sudo setsebool -P httpd_can_network_connect_db on