关闭firewalld、关闭selinux
rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
yum install yum-utils -y
yum-config-manager --disable mysql80-community
yum-config-manager --enable mysql57-community
yum install mysql-community-server
systemctl start mysqld && systemctl enable mysqld
cat /var/log/mysqld.log | grep password //查找mysql密码
mysql -u root -p //登陆mysql
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;
mysql> SET PASSWORD = PASSWORD('123456');
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;
yum install centos-release-scl
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
yum install zabbix-server-mysql zabbix-agent
yum-config-manager --enable rhel-server-rhscl-7-rpms
vim /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
...
enabled=1
...
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
vim /etc/zabbix/zabbix_server.conf
DBPassword=password
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
http://server_ip_or_name/zabbix