开始前,先关闭防火墙和selinux,不然后面zabbix-server服务无法开启
yum -y install httpd mariadb-server php php-mysql
mkdir zabbix-pkg
wget https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-server-mysql-3.4.10-1.el7.x86_64.rpm https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-web-3.4.10-1.el7.noarch.rpm https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-get-3.4.10-1.el7.x86_64.rpm https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.10-1.el7.x86_64.rpm https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-web-mysql-3.4.10-1.el7.noarch.rpm -P zabbix-pkg/
yum -y install epel-release
yum -y install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum -y localinstall zabbix-pkg/*
systemctl restart mariadb
mysql -uroot -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
web配置
用户名/密码 Admin zabbix
添加监控机器
rpm -i https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.10-1.el7.x86_64.rpm
修改配置文件,指定zabbix server IP地址
sed -i '/^Server=127.0.0.1$/c\Server=172.16.51.48' /etc/zabbix/zabbix_agentd.conf
启动服务
systemctl start zabbix-agent
systemctl enable zabbix-agent
systemctl is-active zabbix-agent