Linux (CentOS6.5) to modify the default source for domestic yum Ali cloud, Netease yum source

Modifications:

echo back up your current yum source 
mv /etc/yum.repos.d /etc/yum.repos.d.backup4comex 
echo the new empty set yum source directory 
mkdir /etc/yum.repos.d 
yum source configuration echo download Ali cloud 
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

Then rebuild cache:

yum clean all
yum makecache

clipboard

======================== my lovely dividing line ==================== ====

Execution error "-bash: wget: command not found" the solution

Execution error:

clipboard[1]

The original default is not installed centos minimum version of wget. We need to yum install it.

Configuration Rollback

cp /etc/yum.repos.d.backup4comex/* /etc/yum.repos.d

Then yum install wget

yum install wget -y

clipboard[2]

Then get it again:

rm -rf /etc/yum.repos.d
mkdir /etc/yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

Guess you like

Origin www.cnblogs.com/sx66/p/11587215.html