Configuring Redhat 6 system Yum NetEase source

Source: Internet
Author: User
Tags gpg sha1

Configuration RedHat 6 system YUM NetEase Source

Uninstall redhat with yum, then download the centos Yum , modify the configuration file after installation

1. First download the package to http://mirrors.163.com/centos

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

the necessary download packages are (for example, in the case of the system):

A python-iniparse-0.3.1-2.1.el6.noarch.rpm

b yum-3.2.29-40.el6.centos.noarch.rpm

C yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

D yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

[Email protected]~]#wget http://mirrors.163.com/centos/6/os/x86_64/Packages/ python-iniparse-0.3.1-2.1.el6.noarch.rpm

[Email protected] ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/ yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

[Email protected] ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/ yum-3.2.29-40.el6.centos.noarch.rpm

[Email protected] ~]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/ yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

2. Uninstall RedHat 's own Yum

[Email protected] ~]# rpm-qa | grep yum| xargs rpm-e--nodeps

Note:a,Xargs is a common command for UNIX and Unix -like operating systems. It does this by converting the argument list to small pieces to pass to other commands to avoid the problem of too long argument lists

b,--nodeps forced unloading , regardless of dependency

3. Install the download of the centos yum Package:

yum-3.2.29 and the Yum-plugin-fastestmirro need to be installed together, or there will be a dependency error.

[Email protected] ~]# rpm-ivhpython-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, KeyID C105b9de:nokey

Preparing ... ########################################### [100%]

Packagepython-iniparse-0.3.1-2.1.el6.noarch is already installed

[Email protected] ~]# rpm-ivhyum-metadata-parser-1.1.2-16.el6.x86_64.rpm

Warning:yum-metadata-parser-1.1.2-16.el6.x86_64.rpm:header V3 rsa/sha1 Signature, KeyID C105b9de:nokey

Preparing ... ###########################################[100%]

1:yum-metadata-parser ###########################################[100%]

[Email protected] ~]# rpm- ivhyum-3.2.29-40.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

Warning:yum-3.2.29-40.el6.centos.noarch.rpm:header V3 rsa/sha1 Signature, key Idc105b9de:nokey

Preparing ... ########################################### [100%]

1:yum-plugin-fastestmirro########################################### [50%]

2:yum ########################################### [100%]

[Email protected] ~]#

4. Download to http://mirrors.163.com 's centos Help documentation Centos6-base-163.repo files, stored in /ETC/YUM.REPO.D in

[Email protected] ~]# wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

[Email protected] ~]# cpcentos6-base-163.repo/etc/yum.repos.d/

[Email protected] ~]# cd/etc/yum.repos.d/

[Email protected]]# ls

Centos6-base-163.repo Rhel-source.repo

[[Email protected]]#

5. Edit the Centos6-base-163.repo file to Change its $releasever to version number of CentOS

[Email protected]]# Vimcentos6-base-163.repo ( change $releasever to 6)

#CentOS-base.repo

#

# The Mirrorsystem uses the connecting IP address of the client and the

# Update statusof Mirror to pick mirrors that is updated to and

# Geographicallyclose to the client. Should use Thisfor CentOS updates

# unless aremanually picking other mirrors.

#

# If themirrorlist= does not work for you, as a fall back to you can try the

# remarked out Baseurl=line instead.

#

#

[Base]

name=centos-6 -base-163.com

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=os

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#released Updates

[Updates]

name=centos-6 -updates-163.com

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=updates

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#additionalpackages that could be useful

[Extras]

name=centos-6 -extras-163.com

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=extras

Gpgcheck=1

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#additionalpackages that extend functionality of existing packages

[Centosplus]

name=centos-6 -plus-163.com

baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=centosplus

Gpgcheck=1

Enabled=0

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

#contrib-packages by Centos Users

[Contrib]

name=centos-6 -contrib-163.com

baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/

#mirrorlist =http://mirrorlist.centos.org/?release=6&arch= $basearch &repo=contrib

Gpgcheck=1

Enabled=0

Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6

in the VI under :

: SETNU

: 1,52s/$releasever/6/gi (1 to 6 of the $releasever inside the line ,gi Global )

6. Yum Clean all clears the original cache

[Email protected]]# Yumclean All

Loaded Plugins:fastestmirror, Product-id, Subscription-manager

This system isnot registered to Red Hat Subscription Management. You can usesubscription-manager to register.

Cleaning Repos:base Extras Updates

Cleaning upeverything

[[Email protected]]#

7. Yum Makecache get yum list

The following prompt indicates that the yum change is complete:

Metadatacache Created

[[Email protected]]# Yummakecache

Loaded Plugins:fastestmirror, Product-id, Subscription-manager

This system isnot registered to Red Hat Subscription Management. You can usesubscription-manager to register.

Determiningfastest Mirrors

Base | 3.7 KB 00:00

Base/group_gz |220 KB 00:00

base/filelists_db | 5.9 MB 00:30

base/primary_db | 4.4 MB 00:11

base/other_db | 2.8 MB 00:05

Extras | 3.3 KB 00:00

extras/filelists_db | One KB 00:00

Extras/prestodelta | 904 B 00:00

extras/primary_db | KB 00:00

extras/other_db | KB 00:00

Updates | 3.4 KB 00:00

updates/filelists_db | 3.0 MB 00:06

Updates/prestodelta | 494 KB 00:02

updates/primary_db | 5.3 MB 00:10

updates/other_db | MB 02:20

Metadata cachecreated

[[Email protected]]#


Configuring Redhat 6 system Yum NetEase source

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.