REDHAT6 modified for domestic source

Source: Internet
Author: User

The following are excerpted from the Internet and are only convenient for later needs.


1 View the Yum you have installed


# rpm-q Yum


2 Uninstall the installed Yum


# rpm-aq|grep Yum|xargs rpm-e--nodeps


3 Download and install Yum


take the following 163 sources as an example


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

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


Note: The number of x86-64 and i386 bit system digits


1) Download yum file


# wget http://mirrors.163.com/centos/6/os/i386/Packages/yum-3.2.29-60.el6.centos.noarch.rpm # wget http:// mirrors.163.com/centos/6/os/i386/packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm # wget http:// mirrors.163.com/centos/6/os/i386/packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarc.rpm # wget http:// mirrors.163.com/centos/6/os/i386/packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

2) Installation Yum


Yum and yum-plugin-fastestmirror are dependent, so we have to pack together.


# 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 Yu m-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
Note: Encountered Libc.so.6 () (64bit) is needed xxxxxx basically because of the wrong version, because you are required to install it said Dynamic Data link library is not easy to drop ...


4 update Repo


# cd/etc/yum.repos.d/
# wget Http://mirrors.163.com/.help/CentOS-Base-163.repo


Note: The configuration will appear $releasever and $basearch These two variables, we must first confirm whether these two environment variables exist

If present, vi down command line mode input

:%s/$releasever/6/g

:%s/$basearch/i386/g

are replaced (6 is Redhat version number, i386 is the number of system digits)


5 clearing and rebuilding cache


# yum Clean all # yum Makecache
at this point, the Yum installation is complete.



There are many Yum source configuration information on the Internet, you can find it yourself, the more row configuration method is step 4, then go straight to step 5, if the error will download the file renamed to Rhel-debuginfo.repo. After also reported wrong, we recommend to modify the download repo URL, to test again.










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.