[root@Tang-2~]# vim /etc/my.cnf
skip_name_resolve =ON
innodb_file_per_table =ON
2.3 启动 Mariadb-server ,并设置为开机启动
[root@Tang-2~]# systemctl start mariadb.service
[root@Tang-2~]# systemctl enable mariadb.service
Created symlink from/etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.[root@Tang-2~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN050*:3306*:*LISTEN0128*:111*:*LISTEN0128*:22*:*LISTEN0100127.0.0.1:25*:*LISTEN0128:::111:::*LISTEN0128:::22:::*
2.4 设置 Zabbix Server 使用的数据库(创建相应数据库并进行登陆授权)
[root@Tang-2~]# mysql
Welcome to the MariaDB monitor. Commands end with; or \g.
Your MariaDB connection id is 2
Server version:5.5.64-MariaDB MariaDB Server
Copyright(c)2000,2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>CREATEDATABASE zabbix CHARSET'utf8';
Query OK,1 row affected(0.00 sec)
MariaDB [(none)]>GRANTALLON zabbix.*TO'zbxuser'@'172.16.141.%'IDENTIFIEDBY'zbxpass';
Query OK,0 rows affected(0.00 sec)
MariaDB [(none)]>GRANTALLON zabbix.*TO'zbxuser'@'127.0.0.1'IDENTIFIEDBY'zbxpass';
Query OK,0 rows affected(0.00 sec)
MariaDB [(none)]>FLUSHPRIVILEGES;
Query OK,0 rows affected(0.00 sec)
MariaDB [(none)]>EXIT
Bye
3、Zabbix Server 部署(本次实验 Zabbix Server 和 Mariadb 部署在同一主机)