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 install yum source in Red Hat

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to install the YumSource in Red Hat, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take a look at it.

Yum is the front-end software package manager of shell, which is used to download and install applications under Linux.

Setup step

\ 1. Query the original yum

[root@orcl ~] # rpm-qa | grep yumyum-plugin-fastestmirror-1.1.30-37.el6.noarchyum-metadata-parser-1.1.2-16.el6.i686yum-utils-1.1.30-37.el6.noarchyum-plugin-security-1.1.30-37.el6.noarchyum-3.2.29-75.el6.centos.noarchyum-rhn-plugin-0.9.1-43.el6.noarch

\ 2. Delete the original yum

[root@orcl ~] # rpm-aq | grep yum | xargs rpm-e-nodeps [root@orcl ~] # rpm-qa | grep yum [root@orcl ~] #

\ 3. Query the original yum configuration

[root@orcl ~] # whereis yumyum: / etc/yum [root@orcl ~] # rm-fr / etc/yum

\ 4. Download the required installation package http://mirrors.163.com/centos/6.8/os/i386/Packages/ system for 32, so I chose i386. 64's self-search x861464. Can be used

Wget http://mirrors.163.com/centos/6.8/os/i386/Packages/yum-3.2.29-73.el6.centos.noarch.rpm

download

Yum-3.2.29-73.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpmyum-metadata-parser-1.1.2-16.el6.i686.rpmPython-iniparse-0.3.1-2.1.el6.noarch.rpm

\ 5. Install python

[root@orcl] # rpm-ivh python-iniparse-... .noarch.rpmforth: python-iniparse-0.4-9.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEYerror: Failed dependencies:python (abi) = 2.7is needed by python-iniparse-0.4-9.el7.noarch

The current installation version is not compatible with the server, go back one version and try again. View the current release number

Error encountered by cat / etc/issue Red Hat Linux installation CentOS yum source Red Hat Linux installation CentOS yum source

The number of bits of the system is not consistent with that of the installation package file / bin/ls

Error: Failed dependencies:libc.so.6 () (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libc.so.6 (GLIBC_2.2.5) (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libglib-2.0.so.0 () (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libpthread.so.0 () (64bit) is Needed by yum-metadata-parser-1.1.2-16.el6.x86_64libpython2.6.so.1.0 () (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libsqlite3.so.0 () (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libxml2.so.2 () (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64libxml2.so .2 (LIBXML2_2.4.30) (64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64

Download the 32-bit package again

[root@orcl] # rpm-ivh python-iniparse-0.3.1-2.1.el6.noarch.rpmPreparing... # [100%] package python-iniparse-0.3.1-2.1.el6.noarch is already installed [root@orcl] # rpm-ivh yum-metadata-parser-1.1.2-16.el6.i686.rpmPreparing... # [100%] 1:yum-metadata-parser # [100%] [root@orcl] # rpm-ivh yum-3.2.29 -73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpmPreparing... # [100%] 1:yum-plugin-fastestmirro### [50%] 2:yum # # # [100%] [root@orcl ~] #

Note that the last two packages must be installed at the same time, otherwise the yum source will be changed depending on each other (using NetEase's CentOS mirror source)

[root@localhost yum] # cd / etc/yum.repos.d/ [root@localhost yum.repos.d] # rm-rf * [root@localhost yum.repos.d] # wget http://mirrors.163.com/.help/CentOS6-Base-163.repo[root@localhost yum.repos.d] # vi CentOS6-Base-163.repo

Change all $releasever to a specific version number. What I write here is 6.8. Just http://mirrors.163.com/centos this one.

# 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-$releasever-Base-163.combaseurl = http://mirrors.163.com/centos/6.8/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates [updates] name=CentOS-$releasever-Updates-163.combaseurl = http://mirrors.163.com/centos/6.8/updates/$basearch/# Mirrorlist= http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be usefull [extras] name=CentOS-$releasever-Extras-163.combaseurl = http://mirrors.163.com/centos/6.8/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever-Plus-163.combaseurl = http://mirrors.163.com/centos/6.8/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib-packages by Centos users [contrib] name=CentOS-$releasever-Contrib-163.combaseurl = http://mirrors.163.com/centos/6.8/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever& Arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey= http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

Clean up the yum cache

Yum clean all

Show installed and securely installed packages

Yum list

You can update the package or install as required

Yum update / yum install package name Thank you for reading this article carefully. I hope the article "how to install YumSource in Red Hat" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report