Step 2: Install and configure the Zabbix database

We are going to use mariadb as our Zabbix backend database, but you can use any supported Zabbix database (MySQL,PostgresSQL,Oracle, IBM DB2, SQLite).

Install DB (mariadb)

yum install mariadb-server -y

Start and check the status of mariadb. The chkconfig command is used to ensure mariadb will start after reboot.

chkconfig mariadb on systemctl start mariadb systemctl status mariadb

Configure the Zabbix Database

Connect to mariadb as the root and create the zabbix db. Here we are using the default “root” and no password for our database user. In your production environment, make sure to secure the database using the “mysql_secure_installation” command.

mysql

The database name we will create in our example is going to be zabbix: you can create your own name.

create database zabbix character set utf8 collate utf8_bin; show databases;

Granting privileges to the database user “zabbix”.

grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; quit;