标签:after repository CentOS fix 6.10 repo etc yum
We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth
yum
upgrades for production use, this is the repository for you.Active subscription is required.
If for whatever reason, you are stuck with the now EOL version of the CentOS operating system, you can no longer run yum upgrade
successfully. Running yum upgrade
in CentOS 6 will yield the following results:
Setting up Upgrade Process
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
Rightfully so, as the YUM repository was removed from the main CentOS update servers, no security or feature upgrades are provided.
However, not all the repositories have halted their support for CentOS 6. The GetPageSpeed repository still provides up-to-date NGINX builds and its module packages.
This may be one reason why you want yum upgrade
to still work. Or simply, you are not ready to move on with a newer operating system, and willing to take the security risks associated with using the older version.
How to fix yum upgrade
then?
Use the CentOS Vault repository
The CentOS Vault repositories have been around for a long time and allow you to stick to a specific CentOS x.y release even while newer ones are available. Now that there will be no newer 6.x, you can simply point your yum
repository configuration to the latest 6.x that will ever be, which is 6.10.
To use the Vault repository, set up its repo configuration instead of the now defunct repositories configuration:
curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo
That’s it, everything should be functional.
Alternatively, you can manually replace the contents of the file /etc/yum.repos.d/CentOS-Base.repo
with the necessary configuration.
Copy-paste the entire snippet below and hit Enter:
cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF
Now you can run yum upgrade
without problems. This also allows you to get to the latest release 6.10 even if you were left behind at, e.g. 6.7.
Not only yum upgrade
works, but you can also install arbitrary packages as usual.
Fixing EPEL repository
curl https://www.getpagespeed.com/files/centos6-epel-eol.repo --output /etc/yum.repos.d/epel.repo
Fixing SCLO repositories
The repositories containing newer compilation software like gcc
is available via Software Collections.
However, its repositories are likewise gone. Use Vault repositories instead:
yum -y install centos-release-scl
curl https://www.getpagespeed.com/files/centos6-scl-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl.repo
curl https://www.getpagespeed.com/files/centos6-scl-rh-eol.repo --output /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
标签:after,repository,CentOS,fix,6.10,repo,etc,yum 来源: https://www.cnblogs.com/lkj371/p/15352342.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。