Redhat replacing the CentOS 6.6 yum Source

Source: Internet
Author: User
Tags gpg

Newly installed redhat6.4. After installation, log in to the system and update the system with Yum update. Tips:

This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.

cannot be updated.

Redhat The default comes with a Yum source that needs to be registered before it can be updated. We want to be able to update without spending money, we need to replace Redhat's Yum source.

1. Check if the Yum package is installed

To see if Rhel is installed with Yum, and if so, what Yum packages are available:

[Email protected] ~]# Rpm-qa |grep Yum

Yum-metadata-parser-1.0-8.fc6

Yum-3.0.1-5.el5

Yum-rhn-plugin-0.4.3-1.el5

Yum-updatesd-3.0.1-5.el5

2 Delete Redhat's own Yum pack

Uninstall all of the Yum packages shown above:

[[email protected] ~]# rpm-qa|grep Yum|xargs rpm-e--nodeps (without checking dependencies, delete rpm packages directly)

Re-use

[Email protected] ~]# Rpm-qa |grep Yum

[Email protected] ~]#

View, no information shows that the uninstallation is complete.

3. Download the new Yum package. Yum Package with Centos6.6

123 # wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm# wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm# wget http://mirrors.163.com/centos/6.5/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm


Installing the Yum Package

Note: A single installation package may depend on other packages (for example, Yum and yum-fastestmirror depend on each other), so we can put all these packages together and install them at the same time with one line of command:

1 # rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

4. Replace the Yum source. Use 163 of the source

123 # 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, which is 6.6 last saved! Or simply copy the following memory to the Centos6-base-163.repo file (modified)


[Base]
Name=centos-6.6-base-163.com
baseurl=http://mirrors.163.com/centos/6.6/os/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6.6&arch= $basearch &repo=os
Gpgcheck=1
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6


#released Updates
[Updates]
Name=centos-6.6-updates-163.com
baseurl=http://mirrors.163.com/centos/6.6/updates/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6.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.6-extras-163.com
baseurl=http://mirrors.163.com/centos/6.6/extras/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6.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.6-plus-163.com
baseurl=http://mirrors.163.com/centos/6.6/centosplus/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6.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.6-contrib-163.com
baseurl=http://mirrors.163.com/centos/6.6/contrib/$basearch/
#mirrorlist =http://mirrorlist.centos.org/?release=6.6&arch= $basearch &repo=contrib
Gpgcheck=1
Enabled=0
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6


5. Clear the original cache

1 # yum clean all

Rebuilding the cache to improve the speed of search installation software

1 # yum makecache

6. Updating the system

1 # yum update


This article is from the "bad-kbase" blog, make sure to keep this source http://bad51men.blog.51cto.com/3141086/1683781

Redhat replacing the CentOS 6.6 yum Source

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.