RHEL 6.0 uses the CentOS yum source

Source: Internet
Author: User

Introduction: Since the Yum online update for Rhel is chargeable, it cannot be used without registering, that is, the software cannot be installed online. In this case, want to use Rhel system, also want to use Yum source to install software online, there is no way? The answer is there is a way, please look down!

1, delete the original Rhel yum
Rpm-aq|grep Yum|xargs rpm-e--nodeps #删除

2. Download the new Yum installation package #这里我们使用CentOS的yum源

wget http://mirror.centos.org/centos/6.0/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
wget http://mirror.centos.org/centos/6.0/os/i386/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

3. Install the Yum package

RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
RPM-IVH yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
RPM-IVH yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

Note: The last two packages are to be installed together at the same time, otherwise you will be prompted to rely on each other and the installation fails.

4. Change the Yum source #我们使用网易的CentOS镜像源
cd/etc/yum.repos.d/
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
VI Centos6-base-163.repo #编辑文件
Replace all the $releasever in the file with the version number, which is 6 last saved!

Or simply copy the following memory to the Centos6-base-163.repo file (modified)

1 # Centos-base.repo
*
3# The mirror system uses the connecting IP address of the client and the
4# update status of each mirror to pick mirrors that is updated to and
AA geographically close to the client. You should the use of this for CentOS updates
6# unless you is manually picking other mirrors.
7#
8# If The mirrorlist= does not work for you, as a fall back to you can try the
9# remarked out baseurl= line instead.
10#
11#
12
13[base]
14name=centos-6-base-163.com
15baseurl=http://mirrors.163.com/centos/6/os/$basearch/
16#mirrorlist=http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=os
17gpgcheck=1
18gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
19
20#released Updates
21[updates]
22name=centos-6-updates-163.com
23baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
24#mirrorlist=http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=updates
25gpgcheck=1
26gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
27
28#additional packages that could be useful
29[extras]
30name=centos-6-extras-163.com
31baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
32#mirrorlist=http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=extras
33gpgcheck=1
34gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
35
36#additional packages that extend functionality of existing packages
37[centosplus]
38name=centos-6-plus-163.com
39baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
40#mirrorlist=http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=centosplus
41gpgcheck=1
42enabled=0
43gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6
44
45#contrib-packages by Centos Users
46[contrib]
47name=centos-6-contrib-163.com
48baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
49#mirrorlist=http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=contrib
50gpgcheck=1
51enabled=0
52gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

5. Yum Clean all #清理yum缓存
Yum Makecache #将服务器上的软件包信息缓存到本地 to improve the speed of search and install software
Yum Install vim* #测试yum是否可用

At this point, Redhat6 can use CentOS's yum source to install software online!

Reprinted from: http://www.osyunwei.com/archives/162.html

RHEL 6.0 uses the CentOS 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.