RedHat 6.6 Self-built Yum Warehouse

Source: Internet
Author: User
Tags gpg

Experimental steps

1, check whether the system installed Yum

[Email protected] ~]# Rpm-qa |grep Yum

Packagekit-yum-plugin-0.5.8-23.el6.x86_64

Yum-metadata-parser-1.1.2-16.el6.x86_64

Yum-utils-1.1.30-30.el6.noarch

Yum-3.2.29-60.el6.noarch

Yum-plugin-security-1.1.30-30.el6.noarch

Packagekit-yum-0.5.8-23.el6.x86_64

Yum-rhn-plugin-0.9.1-50.el6.noarch

2. Remove the installed Yum package

[[email protected] ~]# rpm-qa |grep yum |xargs rpm-e--nodeps/delete Yum package directly without checking dependencies

[Email protected] ~]# Rpm-qa |grep Yum

[Email protected] ~]#

3, download the new Rhel6.6yum package

Note: I am downloading the Centos6.6yum package here because there is no rhel in the mirrors.163.com mirror site, and CentOS6.6 is the same as its architecture, so there is no impact and no need to worry.

Yum packages that need to be downloaded:

yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

yum-3.2.29-60.el6.centos.noarch.rpm

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

[Email protected] ~]# wget http://mirrors.163.com/centos/6.6/os/x86_64/Packages/ yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm/Other software download method also

can also be downloaded directly from the website:

: Http://mirrors.163.com/centos/6.6/os/x86_64/Packages

You can also download it by using the attachments in this article

4. Install the Yum package

[Email protected] rpm]# RPM-IVH yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm/This installation can resolve Yum package dependencies

Warning:yum-3.2.29-60.el6.centos.noarch.rpm:header V3 rsa/sha1 Signature, key ID C105b9de:nokey

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

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

2:yum-plugin-fastestmirro########################################### [67%]

3:yum ########################################### [100%]

[Email protected] rpm]#

5. Update the Yum source

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

[[email protected] yum.repos.d]# ls

Packagekit-media.repo Rhel-source.repo

[[email protected] yum.repos.d]# RM-RF./*/delete the old ". Repo" file in the "YUM.REPOS.D" directory

[[email protected] yum.repos.d]# vim Base.repo/new Base.repo file and enter the following

[Base]

Name=redhat-6.6-base-163.com

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

Gpgcheck=1

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

#名称最好做到见名之意, no impact on follow-up

#下载软件的链接地址

#是否启用gpg检查gpgkey, 1 is open, 0 is off

#开启gpgcheck后, by Gpgkey to specify, the corresponding GPG file, if you do not specify the Gpgkey file, then you must manually import the corresponding GPG file,


[Updates]

Name=redhat-6.6-updates-163.com

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

Gpgcheck=1

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


[Extras]

Name=redhat-6.6-extras-163.com

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

Gpgcheck=1

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


[Centosplus]

Name=redhat-6.6-plus-163.com

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

Gpgcheck=1

Enabled=0

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


[Contrib]

Name=redhat-6.6-contrib-163.com

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

Gpgcheck=1

Enabled=0

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

6. Clear the original cache

[email protected] yum.repos.d]# Yum Clean all

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

This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.

Cleaning Repos:base Extras Updates

Cleaning up everything

7. Rebuilding the cache to improve the speed of searching and installing software

[email protected] yum.repos.d]# Yum Makecache

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

This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.

Determining fastest Mirrors

base               nbsp                          ,         &NB Sp                          ,         &NB Sp                          | 3.7 KB     00:00     

base/other_db | 2.8 MB 00:12

 .............................................    

Metadata Cache Created

8. Update the system

[[email protected] yum.repos.d]# Yum Update/update time may be too slow, depending on the situation



At this point, this document has ended, there is inevitably some unsatisfactory in the documentation, I hope you can give valuable suggestions, thank you!



The peak of the forbidden

August 5, 2015 13:36

This article is from the "top of the Purple Forbidden" blog, please make sure to keep this source http://1343138116.blog.51cto.com/6124664/1681861

RedHat 6.6 Self-built Yum Warehouse

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.