1. Configuration Source :
RPM -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
`
2. Tsinghua modified to mirror source:
Sed -i 'S # repo.zabbix.com mirrors.tuna.tsinghua.edu.cn # / # ZABBIX G' /etc/yum.repos.d/zabbix.repo
there may be single quotes No, we need to change single quotes
3.安装zabbix 相关组件:
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server
4. Set the boot from Kai mariadb and start mariadb:
systemctl enable mariadb | systemctl Start mariadb
5.创建zabbix数据库:
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
And 6. Create authorized user:
MariaDB [(none)]> Grant All ZABBIX * to ON 'Tom' @ 'localhost' IDENTIFIED by '123';.
Query the OK, 0 rows affected (0.00 sec)
7.刷新权限:
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
8. introducing initial database
zcat /usr/share/doc/zabbix-server-mysql-4.0.18/create.sql.gz | mysql -utom -p123 zabbix
9. zabbix-server configuration
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=tom
DBPassword=123
10. modify the time zone:
Vim /etc/httpd/conf.d/zabbix.conf
modified
php_value date.timezone Asia / Shanghai
11. Turn off the firewall
systemctl STOP firewalld
setenforce 0
12. Start all services
systemctl restart zabbix-server httpd zabbix- agent
13. The browser access http://10.0.1.9/zabbix
Follow the prompts to complete the next step
The installation is complete!