注意:
关闭selinux;
关闭防火墙
1、组件版本:
CentOS 7.6 64位
Zabbix 4.0
MySQL MariaDB 5.5.6
2、脚本文件:zabbix.sh
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
systemctl stop firewalld
echo nameserver 8.8.8.8 > /etc/resolv.conf
yum install -y mariadb-server
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y
mysql -uroot -pOracle1234 << EOF
use mysql;
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'Oracle1234';
quit;
EOF
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
sed -i '124s/# DBPassword=/DBPassword=Oracle1234/g' /etc/zabbix/zabbix_server.conf
sed -i "4iphp_value date.timezone Asia\/Shanghai/g" /etc/httpd/conf.d/zabbix.conf
systemctl start httpd
多次要求输入密码,建议输入一样的密码
3、访问地址
4、排查
重启:systemctl restart zabbix-server
日志:/var/log/zabbix/*