一、Zabbix Server 安装
1、YUM源配置及基础环境准备
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
常用软件安装
yum install -y lrzsz bash-completion vim wget net-tools ncdu iftop
关闭SELINUX
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
2、zabbix源配置并安装Zabbix Server
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
sed -i "s#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#g" /etc/yum.repos.d/zabbix.repo
yum clean all
yum install zabbix-server-pgsql zabbix-agent
3、安装zabbix web
yum install centos-release-scl
sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/zabbix.repo
yum install zabbix-web-pgsql-scl zabbix-nginx-conf-scl
4、安装数据库PostgreSQL12
wget https://mirrors.aliyun.com/postgresql/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
rpm -ivh pgdg-redhat-repo-latest.noarch.rpm
sed -i "s#https://download.postgresql.org/pub/#https://mirrors.aliyun.com/postgresql/#g" /etc/yum.repos.d/pgdg-redhat-all.repo
yum install -y postgresql12-server
PostgreSQL数据库初始化
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable --now postgresql-12
systemctl