CentOS 7.x Cloudstack 4.11 Setup Mariadb server
From Notes_Wiki
Home > CentOS > CentOS 7.x > CentOS 7.x Cloudstack 4.11 > CentOS 7.x Cloudstack 4.11 Setup Mariadb server
To setup mariadb backend database for cloudstack use following steps:
- Full install CentOS 7.4. Basically we need at least:
- yum -y install epel-release
- yum groupinstall -y "Development Tools"
- yum install -y java-1.8.0-openjdk-devel.x86_64 genisoimage ws-commons-util MySQL-python createrepo
- Disable Selinux by editing /etc/selinux/config
- SELINUX=disabled
- Stop & Disable firewalld
- systemctl stop firewalld
- systemctl disable firewalld
- Set linux system hostname by editing /etc/hostname
- hostname.domain.com
-
- and also edit /etc/hosts to reflect the same:
- 192.168.1.2 hostname.domain.com hostname
- and also edit /etc/hosts to reflect the same:
- Install NTP client as following
- yum install ntp -y
- Edit /etc/ntp.conf' to have:
- server 192.168.2.2
-
- where 192.168.2.2 is local ntp server
- Start and enable ntp service
- systemctl start ntpd
- systemctl enable ntpd
- Install Mariadb using:
- yum install mariadb-server mariadb -y
- Add below parameters under [mysqld] section in /etc/my.cnf file
- innodb_rollback_on_timeout=1
- innodb_lock_wait_timeout=600
- max_connections=350
- log-bin=mysql-bin
- binlog-format=ROW
- bind-address=0.0.0.0
- Restart mariadb and enable it on start using:
- systemctl restart mariadb
- systemctl enable mariadb
- Optionally secure maria db using:
- mysql_secure_installation
-
- It is important to have root password for remote connections
- Give grant permission to root user on all databases from any remote machine:
- # mysql -u root -p
- > grant all privileges on *.* to 'root'@'%' identified by '<secret-root-password>' WITH GRANT OPTION;
- > flush privileges;
-
- Better option is to give this privilege only from cloudstack management server instead of using '%' (everywhere)
Home > CentOS > CentOS 7.x > CentOS 7.x Cloudstack 4.11 > CentOS 7.x Cloudstack 4.11 Setup Mariadb server