1.查看wget是否安裝及wget安裝卸載方法
rpm -qa |grep "wget"
yum install -y wget 安裝
yum remove -y wget 卸載
2.備份 /etc/yum.repos.d/CentOS-Base.repo
cd /etc/yum.repos.d
mv CetOS-Base.repo CentOS-Base.repo.bk
3.下載新的CentOS-Base.repo到/etc/yum.repos.d/
如下的源用一個(gè)就好,三條命令任選其一
//更新為阿里云的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
//更新為163的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS-Base-163.repo
//更新為搜狐的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
4.運(yùn)行yum makecache生成緩存
yum clean all
yum makecache
5更新系統(tǒng)
yum -y update
創(chuàng)新互聯(lián)主營(yíng)鄉(xiāng)寧網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶App定制開發(fā),鄉(xiāng)寧h5成都微信小程序搭建,鄉(xiāng)寧網(wǎng)站營(yíng)銷推廣歡迎鄉(xiāng)寧等地區(qū)企業(yè)咨詢