For server hardware, each node requires at a minimum:
- 1GHz single core CPU
- 512MB RAM
- 100 Mbps network connectivity
- LinuxOS (Ubuntu 14.04 x64 preferred)
- Disable SELinux by typing
sudo setenforce 0
- Add MariaDB to your server repository
sudo apt-get install software-properties-common python-software-properties sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db sudo add-apt-repository 'deb deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu/ trusty main'
- Make sure your server accept incoming connection from TCP port 3306
ORsudo iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT sudo iptables-save
## The Linux kernel in Ubuntu provides a packet filtering system using netfilter, and the traditional interface for manipulating netfilter are the iptables suite of commands. But, it comes with easy to use ufw (Uncomplicated Firewall) tool. To open port 3306, enter: sudo ufw allow 3306 ## only allow subnet 192.168.1.0/24 to connect to our mysql server ## sudo ufw allow from 192.168.1.0/24 to any port 3306
- Disabling AppArmor
sudo ln -s /etc/apparmor.d/usr /etc/apparmor.d/disable/.sbin.mysqld sudo service apparmor restart
- Installing Galera Cluster
apt-get install mariadb-client mariadb-galera-server galera
- Once you install mariadb server. Login to your mariadb-server by typing
mysql -uroot -p<your_password>
. - Create new user and give new privileges.