RHEL6 configure yum source

Background to the issue:

    It originated in the attempt to use yum install mongodb. The reason is that by the time the installation package installation, system virtual machines, always will be prompted to rely on a variety of versions earlier than prompted, and then manually install the update is unlimited. . .

So I had no option but to use yum to install. But redhat system, yum, not search software, you need to configure yum check on the source. Then again, do not fly is to find a lot of articles, various failed attempts, finally managed to have a precise number of articles, the middle and the discretion of a mistake, so here as a record for later search.

Reference article:

[1] rhel6 yum source configured to mirror YORK:

http://www.jianshu.com/p/446e3fe7d710

[2] Mirror open YORK station:

http://mirrors.163.com/centos/6/os/x86_64/Packages/

[3] redhat source arranged 163yum local source epel source yum, yum without uninstalling! Without copy ISO

http://www.cnblogs.com/dadong616/p/5586697.html

 

Articles [1] in said first uninstall the most common yum / a bunch of articles search methods when re-installation. . . However, [3] provides a way without unloading, in fact, directly modify the configuration of yum source.

 

The following describes the first method I use, refer to the article [1].

Articles [1] in most of the steps are not the problem, in order to operate, but there are several issues that require special attention:

Since the current is 2017-07-24, so I downloaded the file version:

python-iniparse-0.3.1-2.1.el6.noarch.rpm

yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm

yum-3.2.29-81.el6.centos.noarch.rpm

 

Installation commands and procedures [1] is consistent with, but replacing the above file version.

 

Steps:

1, delete the local installed yum


-aq rpm | grep yum | xargs rpm -e - nodeps
2, installed just downloaded rpm


Python-iniparse--ivh RPM 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-81.el6 .centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm

Note that the last two packages required to install, otherwise they will be interdependent

 


In addition, in the final step, execute rpm when installed yum-3.2.29 installation, with the error message:


[root@bogon softwares]# rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
warning: yum-3.2.29-81.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-81.el6.centos.noarch

As above, the error message is obvious, is also deleted python-urlgrabber, more 3.9.1-10 version dependency, therefore, found in the corresponding version from [2]:

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
use rpm to perform the installation:

rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
but another error:

warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.py from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/grabber.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyc from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch
file /usr/lib/python2.6/site-packages/urlgrabber/progress.pyo from install of python-urlgrabber-3.9.1-11.el6.noarch conflicts with file from package python-urlgrabber-3.9.1-8.el6.noarch

Pit father ah. . Fortunately, there are conflicts with tips, indicating a conflict with the version history, and added in the command rpm --force mandatory installation attempts to install, the installation was successful:

rpm -ivh --force python-urlgrabber-3.9.1-11.el6.noarch.rpm
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:python-urlgrabber ########################################### [100%]

Finally, execute rpm install yum-3, the command prompt and successful implementation of the following:

rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
warning: yum-3.2.29-81.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:yum-plugin-fastestmirro########################################### [ 50%]
2:yum ########################################### [100%]

At this point, yum installation process is complete.


But this time, the software is not found, according to [1] mentioned, the configuration can be a source rpm.


4. Update the repo file
mv /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak

vi /etc/yum.repos.d/rhel-debuginfo. repo

Says:

[base]

name=CentOS-$releasever - Base

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

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates

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

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released

#[addons]

#name=CentOS-$releasever - Addons

#baseurl=http://mirrors.163.com/centos/6/addons/$basearch/

#gpgcheck=1

#gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

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

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

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

gpgcheck=1

enabled=0

 


After the configuration, yum install php used to verify successful installation.

 

[Experience] yum install process, the likely there will be other issues, but most of the articles are copy to copy each other, not even to explain their version of the system, there are some paste error, and the lead pit father, wasting a lot of time; therefore, be sure to analyze and try to find the source of the article, but we also have to take the initiative to analyze error prompt to be able to really solve.
----------------
Disclaimer: This article is CSDN blogger "Meteors stars" of the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source and this link statement.
Original link: https: //blog.csdn.net/liuhuoxingkong/article/details/75949704

Guess you like

Origin www.cnblogs.com/lee-qi/p/11681931.html