1、mariadb数据库:[root@Centos ~]# vim /etc/my.cnf
skip_name_resolve = ON
innodb_file_per_table = ON
启动服务:[root@Centos ~]# systemctl restart mariadb.service
开机自启:[root@Centos ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
登陆mariadb:[root@Centos ~]# mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE zabbix CHARSET 'utf8';
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbixuser'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
2、zabbix服务器:
# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
# yum clean all
安装Zabbix server,Web前端,agent
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
导入数据库脚本:
[root@Centos ~]# cp /usr/share/doc/zabbix-server-mysql-4.0.6/create.sql.gz ./
[root@Centos ~]# gzip -d create.sql.gz
[root@Centos ~]# mysql -uzabbixuser -hlocalhost -p123456 zabbix < ./create.sql
配置文件:vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbixuser
DBPassword=123456
修改时间:[root@Centos zabbix]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
启动服务:systemctl start zabbix-server.service
连接到新安装的Zabbix前端: http://server_ip_or_name/zabbix
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。