CentOS 7.x Cloudstack 4.11 Setup Mariadb server

From Notes_Wiki
Revision as of 16:17, 28 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

  1. 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
  2. Disable Selinux by editing /etc/selinux/config
    SELINUX=disabled
  3. Stop & Disable firewalld
    systemctl stop firewalld
    systemctl disable firewalld
  4. 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
  5. Install NTP client as following
    1. yum install ntp -y
    2. Edit /etc/ntp.conf' to have:
      server 192.168.2.2
      where 192.168.2.2 is local ntp server
  6. Start and enable ntp service
    systemctl start ntpd
    systemctl enable ntpd
  7. Install Mariadb using:
    yum install mariadb-server mariadb -y
  8. 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
  9. Restart mariadb and enable it on start using:
    systemctl restart mariadb
    systemctl enable mariadb
  10. Optionally secure maria db using:
    mysql_secure_installation
    It is important to have root password for remote connections
  11. 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