Linux 6.4 Setup Yum for CentOS source

Source: Internet
Author: User
Tags gpg

First, delete the redhat comes with Yum

Root User execution

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

Ii. Download the Yum installation file for CentOS

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

Third, install Yum

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

The last two RPM packages need to be installed simultaneously

Iv. Update Repo file

Vi/etc/yum.repos.d/rhel-debuginfo.repo

Post the following to Rhel-debuginfo.repo

[Base]
name=centos-$releasever-base
baseurl=http://mirrors.163.com/centos/6.0/os/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#released Updates
[Updates]
name=centos-$releasever-updates
baseurl=http://mirrors.163.com/centos/6.0/updates/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6

#packages used/produced in the build and not released
#[addons]
#name =centos-$releasever-addons
#baseurl =http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck =1
#gpgkey =http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#additional packages that could be useful
[Extras]
name=centos-$releasever-extras
baseurl=http://mirrors.163.com/centos/6.0/extras/$basearch/
Gpgcheck=1
Gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-6
#additional packages that extend functionality of existing packages
[Centosplus]
name=centos-$releasever-plus
baseurl=http://mirrors.163.com/centos/6.0/centosplus/$basearch/
Gpgcheck=1
Enabled=0

V. Yum Clean all

Six, yum install vim #测试一下可不可以用

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.