RHEL6.3as64bit configure yum Source

Source: Internet
Author: User
Tags gpg

RHEL6.3as64bit configure yum Source

1. query the original yum of redhat.

[root@localhost ~]# rpm -qa |grep yumyum-metadata-parser-1.1.2-16.el6.x86_64yum-rhn-plugin-0.9.1-40.el6.noarchyum-plugin-security-1.1.30-14.el6.noarchPackageKit-yum-0.5.8-20.el6.x86_64yum-utils-1.1.30-14.el6.noarchPackageKit-yum-plugin-0.5.8-20.el6.x86_64

2. Delete the original yum of redhat.

[root@localhost ~]# rpm -aq|grep yum|xargs rpm -e --nodeps[root@localhost yum.repos.d]# whereis yumyum: /etc/yum[root@localhost yum.repos.d]# rm -rf /etc/yum

3. Download the yum Installation File

In http://mirrors.163.com/centos/6.6/ OS /x86_64/Packages/

(Later centos upgrade, the software package will move the location, generally from the http://mirrors.163.com/centos in, find the latest system version can be)

Rpm file:

python-iniparse-0.3.1-2.1.el6.noarch.rpmyum-3.2.29-60.el6.centos.noarch.rpmyum-metadata-parser-1.1.2-16.el6.x86_64.rpmyum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

4. Install the yum rpm package

rpm -ivh python*rpm -ivh yum*

 

[root@localhost yum]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm warning: python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]package python-iniparse-0.3.1-2.1.el6.noarch is already installed[root@localhost yum]# rpm -ivh yum-*warning: yum-3.2.29-60.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]   1:yum-metadata-parser    ########################################### [ 33%]   2:yum-plugin-fastestmirro########################################### [ 67%]   3:yum                    ########################################### [100%][root@localhost yum]# 

5. Change the yum source (we use the CentOS image source of Netease)

 

[root@localhost yum]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# rm -rf *[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo[root@localhost yum.repos.d]# vi CentOS6-Base-163.repo

Change all $ releasever to the specific version number. Here I write 6.6, and then update centos, it may be 6.7, 6.8, etc., this self open (http://mirrors.163.com/centos) you can find it.

The following are server operation records:

 

[root@localhost yum]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# lltotal 12-rw-r--r--. 1 root root 4440 Nov 20 02:30 CentOS-Base.repo-rw-r--r--. 1 root root  529 May 30  2012 rhel-source.repo.bak[root@localhost yum.repos.d]# rm -rf *[root@localhost yum.repos.d]#  wget http://mirrors.163.com/.help/CentOS6-Base-163.repo--2014-11-20 18:55:19--  http://mirrors.163.com/.help/CentOS6-Base-163.repoResolving mirrors.163.com... 123.58.173.106Connecting to mirrors.163.com|123.58.173.106|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 2006 (2.0K) [application/octet-stream]Saving to: ?.entOS6-Base-163.repo?100%[=======================================================>] 2,006       --.-K/s   in 0.03s   2014-11-20 18:55:19 (63.8 KB/s) - ?.entOS6-Base-163.repo?.saved [2006/2006][root@localhost yum.repos.d]# vi CentOS6-Base-163.repo

 

My CentOS6-Base-163.repo content is 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 are updated to and# geographically close to the client.  You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##[base]name=CentOS-$releasever - Base - 163.combaseurl=http://mirrors.163.com/centos/6.6/os/$basearch/#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.6/updates/$basearch/#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.6/extras/$basearch/#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.6/centosplus/$basearch/#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.6/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

 

6. cache Processing

Clear yum Cache

Yum clean all

Cache the software package information on the server to a local machine to speed up searching and installing software.

Yum makecache

Install gcc

Yum install gcc

Now, we can use yum to install and update the software.

Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

End
 

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.