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

Centos7 (redhat7) how to uninstall the native yum and install the domestic YumSource method

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

Share

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

Redhat's update package only works for registered users, so we manually change it to CentOS's update package. CentOS is almost the same as redhat, so there is no need to worry about whether the package can be installed or whether there are problems after installation.

1. Check to see if the Yum package is installed

Rpm-qa | grep yum

two。 Delete the yum package that comes with redhat

Rpm-qa | grep yum | xargs rpm-e-- nodeps (delete the rpm package without checking for dependencies)

3. Download the yum installation package for 163s

Wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpmwget http://mirrors. 163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpmwget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm

4. Install yum

Rpm-ivh * .rpm

At this point, there will be problems with dependent packages, and there may be python package installation conflicts. Therefore, you can add the following two parameters to force the installation:

-- force forces installation even if files belonging to other packages are overwritten-- nodeps forces installation if the installation of the RPM package depends on other packages, even if the other packages are not installed.

5. Change the address of the yum library. Here we use our own domestic yum library, such as NetEase's CentOS mirror source.

Cd / etc/yum.repos.d/wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

6. Change the $releasever in CentOS6-Base-163.repo to 7 and the keyword of 6 to 7.

7. The setting takes effect.

Yum clean all # cleans the yum cache so that the settings take effect yum makecache # caches the software package information on the server locally to improve the speed of searching for installation software

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

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