rpm -Uvh https://repo.zabbix.com/zabbix/6.5/rhel/8/x86_64/zabbix-release-6.5-1.el8.noarch.rpm
dnf clean all
dnf module switch-to php:7.4
dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# 编辑文件:
vim /etc/yum.repos.d/pgdg-redhat-all.repo
# 注释掉failovermethod=priority这一行。
# vim打开文件后按esc进入命令模式,输入":"后,键入下面的命令全部注释掉(看下图)
%s#failovermethod=priority#\#failovermethod=priority
dnf -qy module disable postgresql
sudo dnf install -y postgresql15-server
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl enable postgresql-15
sudo systemctl start postgresql-15
systemctl status postgresql-15
sudo -u postgres createuser --pwprompt zabbix
会让键入密码,我填入的是zabbix
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
vim /etc/zabbix/zabbix_server.conf
将DBPassword改为你刚才设置的密码
vim /etc/nginx/conf.d/zabbix.conf
将下面两行取消注释
# listen 8080;
# server_name example.com;
systemctl restart zabbix-server zabbix-agent nginx php-fpm
systemctl enable zabbix-server zabbix-agent nginx php-fpm
选Asia/shanghai(温馨提示:从最末尾列表往上找)
后面就一直点就行