RedHat Yum configure Netease Image Source

Source: Internet
Author: User

1. Delete the default Source

Delete after Elevation of Privilege

surpm -aq | grep yum|xargs rpm -e --nodeps

2. Install yum

Insert the system disc, if not mounted to the need to mount the disc, the Mount path here is/Media/rhel_6.3 x86_64 disc 1/, the packages directory under the python-iniparse-0.3.1-2.1.e16.noarch.rpm, yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-30.el6.noarch.rpm copy to home directory

cd /media/RHEL_6.3 x86_64 Disc 1/Packagescp python-iniparse-0.3.1-2.1.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-30.el6.noarch.rpm /home/tango/

Yum-plugin-fastestmirror can be installed as an optional tool for Yum acceleration. Because the RHEL package does not exist, you can download it from a Netease image.

curl -O http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm -o /home/tango/

Install yum

rpm -ivh yum-*

Test Yum Installation

yum -h

3. Change Yum Source

Go to the/etc/yum. Repos. d directory and download the Netease image repository file.

cd /etc/yum.repos.dcurl -O http://mirrors.163.com/.help/CentOS6-Base-163.repo

Edit the CentOS6-Base-163.repo file and change $ releasever to 6, $ basearch to the corresponding system version (for example, x86_64)

vim CentOS6-Base-163.repo

.. Replacement omitted, can be replaced with: s, after replacement is successful: WQ save, the edited file is as follows

##[base]name=CentOS-$releasever - Base - 163.combaseurl=http://mirrors.163.com/centos/6/os/x86_64/#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/updates/x86_64/#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 useful[extras]name=CentOS-$releasever - Extras - 163.combaseurl=http://mirrors.163.com/centos/6/extras/x86_64/#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/centosplus/x86_64/#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/contrib/x86_64/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


Run the following command to generate the cache

yum clean allyum makecacheyum search mysql


End of this Article


This article from the "Copper Mirror" blog, please be sure to keep this source http://tangoo.blog.51cto.com/9130178/1532979

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.