zabbix5.0安装步骤
安装前准备工作:关闭防火墙与SELinux,配置本地yum源
#关闭防火墙
[root@zabbix-server ~]# systemctl stop firewalld
[root@zabbix-server ~]# systemctl disable firewalld
#关闭SELinux
[root@zabbix-server ~]# setenforce 0
[root@zabbix-server ~]# vim /etc/selinux/config
...
SELINUX=disabled
#搭建本地yum源
[root@zabbix-server ~]# mkdir /mnt/centos
[root@zabbix-server ~]# mount /dev/cdrom /mnt/centos
[root@zabbix-server ~]# rm -rf /etc/yum.repos.d/*
[root@zabbix-server ~]# vim /etc/yum.repos.d/local.repo
[local]
name=local_centos
baseurl=file:///mnt/centos
enabled=1
gpgcheck=0
配置zabbix的存储库
#下载zabbix5.0存储库
[root@zabbix-server ~]# wget https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
#安装存储库
[root@zabbix-server ~]# rpm -ivh zabbix-release-5.0-1.el7.noarch.rpm
#修改zabbix仓库文件
[root@zabbix-server ~]# vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/$basearch/frontend
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0
#安装zabbix软件包
[root@zabbix-server ~]# yum install zabbix-server-mysql zabbix-agent
#创建阿里源
[root@zabbix-server ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#下载CentOS软件包收藏
[root@zabbix-server ~]# yum -y install centos-release-scl
#启用zabbix-frontend存储库