标签:centos 6.7 centos6 001 yum https org vault
问题
centos6被废弃了,网易的镜像(http://mirrors.163.com)不提供了
查看并卸载以前安装包
# 查看
rpm -qa | grep yum
# 卸载所有相关的yum包,直到用查看命令查看时没有yum相关包
rpm -e --nodeps yum-package
安装
查看系统版本
cat /etc/system-release
我的版本是redhat 6.7
进入对应的目录下载以下几个文件
wget https://vault.centos.org/6.7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
wget https://vault.centos.org/6.7/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget https://vault.centos.org/6.7/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm
wget https://vault.centos.org/6.7/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
安装下载的文件
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
修改源文件
没找到https://vault.centos.org中的CentOS-Base.repo,我们用阿里云的,然后修改下
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
- http://mirrors.aliyun.com/centos替换成https://vault.centos.org
- $releasever替换成6.7
- 删除releasever
修改后的文件如下
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-6.7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://vault.centos.org/6.7/os/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=https://vault.centos.org/6.7/updates/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://vault.centos.org/6.7/extras/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://vault.centos.org/6.7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=https://vault.centos.org/6.7/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-6
清理并重新加载缓存
yum clean all
yum makecache
看到下面的情形就是配置好了
标签:centos,6.7,centos6,001,yum,https,org,vault 来源: https://blog.csdn.net/xiangsimoyinjiu/article/details/114694057
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。