Linux configuration Yum Source method detailed _linux

Source: Internet
Author: User
Tags extend gpg

I use the method one, successful configuration, method two has not been tested, can be used as a reference

Method One:

1. Ensure that the Yum is installed in the RHEL5

[Root@lvs-master ~]# rpm-qa |grep yum 
yum-metadata-parser-2-el5 yum-updatesd-9-el5 yum-22-el5 Yum-security-16-el5 

2. Modify the source configuration file #vim/etc/yum.repos.d/centos-base.repo

(If there is no. repo file in the directory, create one yourself)

[Base] name=centos-5-base #mirrorlist =http://mirrorlistcentosorg/?release= $releasever 5&arch= $basearch & Repo=os #baseurl =http://mirrorcentosorg/centos/$releasever/os/$basearch/baseurl=http://ftpsjtueducn/centos/5/os /$basearch/gpgcheck=1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos5 #released updates [UPDATE] Name=cent Os-5-updates #mirrorlist =http://mirrorlistcentosorg/?release=4&arch= $basearch &repo=updates baseurl=http ://ftpsjtueducn/centos/5/updates/$basearch/gpgcheck=1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos5 # Packages used/produced in the builds but not released [addons] name=centos-5-addons #mirrorlist =http://mirrorlistcentoso Rg/?release=4&arch= $basearch &repo=addons baseurl=http://ftpsjtueducn/centos/5/addons/$basearch/gpgcheck =1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos5 #additional packages that could be useful [extras] Name=cent Os-5-extras #mirrorlist =http://mirrorlistcentosorg/?release=4&amP;arch= $basearch &repo=extras baseurl=http://ftpsjtueducn/centos/5/extras/$basearch/gpgcheck=1 gpgkey=http:// MIRRORCENTOSORG/CENTOS/RPM-GPG-KEY-CENTOS5 #additional packages that extend functionality of existing packages [CENTOSP 
LUs] name=centos-5-plus #mirrorlist =http://mirrorlistcentosorg/?release=4&arch= $basearch &repo=centosplus baseurl=http://ftpsjtueducn/centos/5/centosplus/$basearch/gpgcheck=1 enabled=0 gpgkey=http://mirrorcentosorg/ Centos/rpm-gpg-key-centos5 #contrib-packages by CentOS Users [contrib] name=centos-5-contrib #mirrorlist =http://mirr Orlistcentosorg/?release=4&arch= $basearch &repo=contrib baseurl=http://ftpsjtueducn/centos/5/contrib/$ Basearch/gpgcheck=1 enabled=0 Gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos5 # VI Dagrepo [DAG] Name=Dag RPM Repository for RHEL5 baseurl=http://ftprikenjp/linux/dag/redhat/el5/en/$basearch/dag/enabled=1 gpgcheck=1 Gpgkey 

 =http://ftprikenjp/linux/dag/packages/rpm-gpg-keydagtxt

3. Import Key

 
 

4. Run, test

#yum Update 

5.clean operation

 
 

Method Two:

# cd/etc/yum.repos.d/#mv Centos-baserepo centos-baserepobak #wget Http://docslinuxtoneorg/soft/lemp/CentOS-Baserepo The contents of the file are as follows: [Base] name=centos-5-base baseurl=http://centosustceducn/centos/5/os/$basearch/gpgcheck=1 gpgkey=http:// mirrorcentosorg/centos/rpm-gpg-key-centos-5 #released updates [UPDATE] name=centos-5-Updates Baseurl=http://centosu stceducn/centos/5/updates/$basearch/gpgcheck=1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos-5 # Packages used/produced in the builds but not released [addons] name=centos-5-Addons Baseurl=http://centosustceducn/cen tos/5/addons/$basearch/gpgcheck=1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos-5 #additional Packages May is useful [extras] name=centos-5-Extras baseurl=http://centosustceducn/centos/5/extras/$basearch/gpgcheck= 1 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos-5 #additional packages that extend functionality of existing packages [Centosplus] name=centos-5-Plus 
baseurl=http://centosustceducn/centos/5/centosplus/$basearch/gpgcheck=1 enabled=0 gpgkey=http://mirrorcentosorg/ Centos/rpm-gpg-key-centos-5 #contrib-packages by CentOS Users [contrib] name=centos-5-contrib Baseurl=http://cento sustceducn/centos/5/contrib/$basearch/gpgcheck=1 enabled=0 gpgkey=http://mirrorcentosorg/centos/ Rpm-gpg-key-centos-5 #packages in testing [testing] name=centos-5-testing Baseurl=http://centosustceducn/centos/5/te 

 sting/$basearch/gpgcheck=1 enabled=0 gpgkey=http://mirrorcentosorg/centos/rpm-gpg-key-centos-5

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.