OS的版本

[root@test yum.repos.d]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@test yum.repos.d]#

安装zabbix的文档

https://www.zabbix.com/cn/download?zabbix=4.0&os_distribution=oracle&os_version=7&db=MySQL

在安装zabbix的时候,提示发现有两个包没法安装 ,这两个包是bcmatch和mbstring两个包,而且redhat的安装光盘上是没有这两个包的。看了一些文档,,提示注册过redhat操作系统后,会更新这两个包。换一种方法,换centos的源来更新。

先下载CentOS 的源

[root@test yum.repos.d]#wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

修改源的内容,主要修改了3个地方

[root@test yum.repos.d]# more CentOS7-Base-163.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep
o=os
#baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
baseurl=http://mirrors.163.com/centos/7/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep
o=updates
#baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
baseurl=http://mirrors.163.com/centos/7/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep
o=extras
#baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
baseurl=http://mirrors.163.com/centos/7/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
[root@test yum.repos.d]#

清除和创建YUM缓存

yum clean all
yum makecache 

再次安装zabbix,可以了

yum install zabbix-server-mysql zabbix-web-mysql 

END

Logo

更多推荐