Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to replace the software update source for RHEL system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to replace the software update source for the RHEL system". In the daily operation, I believe that many people have doubts about how to replace the software update source for the RHEL system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to replace the software update source for the RHEL system". Next, please follow the editor to study!

RHEL5.X replace update source

The code is as follows:

Cd / etc/yum.repos.d

Wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

Mv CentOS-Base.repo rhel-debuginfo.repo

Rpm-- import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

RHEL6.1 replace update source

1. Remove Yum

The code is as follows:

Rpm-aq | grep yum | xargs rpm-e-nodeps

two。 Download Yum

The code is as follows:

Wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

Wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm

Wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

Wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm

3. Install Yum

The code is as follows:

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-22.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm

4. Update repo file, use NetEase file

Change the directory to / etc/yum.repos.d/ directory

The code is as follows:

Cd / etc/yum.repos.d/

Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

Vi CentOS6-Base-163.repo

Edit the file and replace all the $releasever in the file with the version number, that is, 6 and finally save! Or copy the following memory directly into the CentOS6-Base-163.repo file (which has been modified).

The code is as follows:

# 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.

#

#

The code is as follows:

[base]

Name=CentOS-6-Base-163.com

Baseurl= http://mirrors.163.com/centos/6/os/$basearch/

# mirrorlist= http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os

Gpgcheck=1

Gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

The code is as follows:

# released updates

[updates]

Name=CentOS-6-Updates-163.com

Baseurl= http://mirrors.163.com/centos/6/updates/$basearch/

# mirrorlist= http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates

Gpgcheck=1

Gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

The code is as follows:

# additional packages that may be useful

[extras]

Name=CentOS-6-Extras-163.com

Baseurl= http://mirrors.163.com/centos/6/extras/$basearch/

# mirrorlist= http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras

Gpgcheck=1

Gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

The code is as follows:

# additional packages that extend functionality of existing packages

[centosplus]

Name=CentOS-6-Plus-163.com

Baseurl= http://mirrors.163.com/centos/6/centosplus/$basearch/

# mirrorlist= http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus

Gpgcheck=1

Enabled=0

Gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

The code is as follows:

# contrib-packages by Centos Users

[contrib]

Name=CentOS-6-Contrib-163.com

Baseurl= http://mirrors.163.com/centos/6/contrib/$basearch/

# mirrorlist= http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib

Gpgcheck=1

Enabled=0

Gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

5. Last step

The code is as follows:

Yum clean all # Clean yum cache

Yum makecache # caches package information on the server locally to increase the speed of searching for installed software.

Yum list yum # tests whether the configured yum source is already in effect.

At this point, the study on "how to replace the software update source for the RHEL system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report