#cd /etc/yum.repos.d/
#cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.orig#sed -i 's/#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo#sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-Base.repo#sed -i 's/mirror.centos.org/mirrors.163.com/' /etc/yum.repos.d/CentOS-Base.repo
注意:dns设置必须正确,否则仍然报错