Linux下的yum怎么升级?
1. 备份默认的yum
# mv /etc/yum.repos.d /etc/yum.repos.d.backup
2. 设置新的yum目录
# mkdir /etc/yum.repos.d && cd /etc/yum.repos.d
3. 下载阿里yum配置到该目录中,用wget,进行下载,
# yum install -y wget
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4. 重建缓存
yum clean all执行效果,
[root@ethanyang yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: base centosplus extras updates
Cleaning up everything
yum makecache执行效果,
[root@ethanyang yum.repos.d]# yum makecache
Loaded plugins: langpacks, product-id, search-disabled-repos, subscrip