yum源更新

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/
如下的源用一个就好,三条命令任选其一
//更新为阿里云的源
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.运行yum makecache生成缓存
yum clean all
yum makecache
5更新系统
yum -y update

创新互联主营乡宁网站建设的网络公司,主营网站建设方案,重庆App定制开发,乡宁h5成都微信小程序搭建,乡宁网站营销推广欢迎乡宁等地区企业咨询


本文名称:yum源更新
本文路径:http://pwwzsj.com/article/gspegj.html