In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to configure RHEL Centos yum source, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Because RHEL's yum online update is free, it cannot be used without registration, that is, the software cannot be installed online. In this case, if the machine we are using is a RHEL system, it will be cumbersome to mount the local CD every time we install the software, and some of the software is old, in this case we can use the YUM source of CentOS to meet our needs.
1. Delete the original YUM of RHEL
Rpm-aq | grep yum | xargs rpm-e-nodeps
Download the yum installation package of CentOS (163source)
Wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
Wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
Wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
Wget http://mirrors.163.com/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5
Install the YUM installation package for CentOS
Yum and yum-plugin-fastestmirror need to be installed together. The two packages have dependencies, and separate installation will fail. Import RPM-GPG-KEY into the system before installation, otherwise a warning message will appear.
Rpm-ivh yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
Rpm-import RPM-GPG-KEY-CentOS-5
Rpm-ivh yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rm
Now we can use yum online.
IV. Modify the yum source
In order to use Yum online to install software faster, we can use domestic NetEase Yum source or other domestic yum source
Change the yum source
# We use NetEase's CentOS mirror source
Cd / etc/yum.repos.d/
Vi rhel-debuginfo.repo
# CentOS-Base.repo
#
# 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-5-Base-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
Baseurl= http://mirrors.163.com/centos/5/os/$basearch/
Gpgcheck=1
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# released updates
[updates]
Name=CentOS-5-Updates-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates
Baseurl= http://mirrors.163.com/centos/5/updates/$basearch/
Gpgcheck=1
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# packages used/produced in the build but not released
[addons]
Name=CentOS-5-Addons-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=addons
Baseurl= http://mirrors.163.com/centos/5/addons/$basearch/
Gpgcheck=1
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# additional packages that may be useful
[extras]
Name=CentOS-5-Extras-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=extras
Baseurl= http://mirrors.163.com/centos/5/extras/$basearch/
Gpgcheck=1
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# additional packages that extend functionality of existing packages
[centosplus]
Name=CentOS-5-Plus-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus
Baseurl= http://mirrors.163.com/centos/5/centosplus/$basearch/
Gpgcheck=1
Enabled=0
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
# contrib-packages by Centos Users
[contrib]
Name=CentOS-5-Contrib-163.com
Mirrorlist= http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=contrib
Baseurl= http://mirrors.163.com/centos/5/contrib/$basearch/
Gpgcheck=1
Enabled=0
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
VI. Clean up
Yum clean all
Yum makecache
VII. Update
Yum update
These are all the contents of the article "how to configure Centos yum feeds for RHEL". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.