CentOS 7.x Cloudstack 4.11 Setup Mariadb server

From Notes_Wiki
Revision as of 15:40, 8 July 2018 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb> =CentOS 7.x Cloudstack 4.11 Setup Mariadb server= To setup mariadb backend database...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb>

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 'root' WITH GRANT OPTION;
    > flush privileges;
    Better option is to give this privilege only from cloudstack management server instead of using '%' (everywhere)


<yambe:breadcrumb>CentOS_7.x_Cloudstack_4.11|CentOS 7.x Cloudstack 4.11</yambe:breadcrumb>