Redhalt Configuring the Yum source for CentOS detailed steps

Source: Internet
Author: User
Tags gpg

It should be clear to everyone that Redhalt just installed the system after Yum is not good, and sometimes we like to install vsftp such software when using Yum installation is very convenient. To do this we need to use CentOS's Yum source for configuration. This source update is now fast. This is the general library of NetEase's resources http://mirror.centos.org/. Everything inside. Not much nonsense said:

Specific installation steps:

1. Delete Redhat original Yum source

# Rpm-aq | grep Yum|xargs Rpm-e–nodeps


2. Get the Yum installation package back online

Log in as root to the Redhalt system, the default directory has been switched to/root, with the wget command to download the appropriate Yum package.

The specific commands are as follows:

#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm


#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm


# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm


# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

So the four packages that need to be installed are all downloaded, and the next one needs to be installed.

3. Install the Package

# 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-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

Note: the next two need to be installed together. Because it has a software dependency relationship. There was an error when I installed the last two packages, as follows:

[R[email protected] ~]# RPM-IVH yum-3.2.29-73.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

warning:yum-3.2.29-73.el6.centos.noarch.rpm:header V3 rsa/sha1 Signature, key Idc105b9de:nokey

Error: Failed dependencies:

Python-urlgrabber >= 3.9.1-10 is needed Byyum-3.2.29-73.el6.centos.noarch

or software-dependent issues, you need to install more than 3.9.1-10 version of Python-urlgrabber

Then went to a more than 3.9.1-10 version of the Python-urlgrabber RPM package.

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

continue to install first python-urlgrabber-3.9.1-11.el6.noarch.rpm bag;


# RPM-IVH python-urlgrabber-3.9.1-11.el6.noarch.rpm

After the installation is complete, repeat the last step just now:

# RPM-IVH yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

It finally worked.


4, change the Yum source, use NetEase's Mirror station.

Switch directories to the/etc/yum.repos.d/directory

# cd/etc/yum.repos.d/

# wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

# vim Centos6-base-163.repo

Edit the centos6-base-163.repo file, replace all the $releasever in the file with the version number, this place is version 6, and finally save the exit. 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 is updated to and

# Geographically close to the client. You should the use of this for CentOS updates

# Unless you is manually picking other mirrors.

#

# If The mirrorlist= does not work for you, as a fall back to you can try the

# remarked out Baseurl= line instead.

#

#

[Base]

name=centos-6 -base-163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/----This must be the path name of NetEase library

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

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#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

#additional packages that could 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

#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

#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

Exit Edit Save Exit after change is completed

5. Test whether the installation is good

# yum Clean all # cleanup Yum cache

#yum Makecache # caches the package information on the server locally to increase the speed of the search installation software.

You will see the caching process, stating that it is already installed.

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

You can install a series of software with Yum below.



This article is from the Linux OPS blog, so be sure to keep this source http://dragon007.blog.51cto.com/7740555/1881191

Redhalt Configuring the Yum source for CentOS detailed steps

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.