SCL更换阿里数据源

问题:
zabbix安装前端环境报错
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y

报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/

能上网 但是不能ping通http://mirrorlist.centos.org/

解决:
修改repo数据源

yum install centos-release-scl -y

安装完成后在 /etc/yum.repos.d 目录下会出现 CentOS-SCLo-scl.repo 和 CentOS-SCLo-scl-rh.repo 两个文件,安装后源默认启用

修改CentOS-SCLo-scl.repo

vi /etc/yum.repos.d/CentOS-SCLo-scl.repo

修改此部分的baseurl

[centos-sclo-sclo]
name=CentOS-7 - SCLo sclo
baseurl=https://mirrors.aliyun.com/centos/7/sclo/x86_64/sclo/
# mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-sclo
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

修改CentOS-SCLo-scl-rh.repo

vi /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

修改此部分的baseurl

[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=https://mirrors.aliyun.com/centos/7/sclo/x86_64/rh/
# mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

刷新缓存

yum repolist
yum clean all
yum makecache

你可能感兴趣的:(linux,zabbix,运维)