1. 安裝zabbix5.0
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-agent2
yum-config-manager --enable rhel-server-rhscl-7-rpms && yum install -y centos-release-scl
vim /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1 #打開
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl #安裝zabbix前端
2. 創建zabbix數據庫(mariadb),導入zabbix表
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by '123456';
grant all privileges on zabbix.* to zabbix@localhost;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
3. 修改zabbix_server配置及前端PHP配置
DBPassword=123456
vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
listen 80;
server_name example.com; #打開注釋,修改本機IP
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
listen.acl_users = apache,nginx
; php_value[date.timezone] = Europe/Riga #打開注釋,修改為Asia/Shanghai
4. 啟動server,agent2,nginx,php,啟動之后直接IP訪問安裝
systemctl restart zabbix-server zabbix-agent2 rh-nginx116-nginx rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent2 rh-nginx116-nginx rh-php72-php-fpm
5. 配置自動發現
配置自動發現linux
自動發現-->創建自動發現規則
https://www.zabbix.com/documentation/5.0/zh/manual/installation/frontend/frontend_on_rhel7

6. 自動發現交換機



7. 配置動作
選擇自動發現動作-->創建動作





