有的网络环境限制了访问所有外国IP,连yum都成了问题,只能改成国内源使用,特此记录一下清华大学源和阿里源,以便日后需要
配置清华源
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
mv epel.repo epel.repo.bak(没有可忽略)
vim CentOS-Base.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
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=