欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

linux下配置yum源方法詳解

 更新時間:2016年12月02日 14:09:17   作者:浮云中的毛驢  
本篇文章主要介紹了linux下配置yum源方法詳解,具有一定的參考價值,感興趣的小伙伴們可以參考一下。

本人使用的方法一,成功配置,方法二沒測過,可以作為參考

方法一:

1.確保RHEL5中已經(jīng)安裝了yum

[root@lvs-master ~]# rpm -qa |grep yum 
yum-metadata-parser-2-el5 
yum-updatesd-9-el5 
yum-22-el5 
yum-security-16-el5 
yum-rhn-plugin-4-el5 

2.修改源配置文件 #vim /etc/yum.repos.d/CentOS-Base.repo

(如果目錄下沒有.repo文件自己創(chuàng)建一個)

[base] 
name=CentOS-5-Base 
#mirrorlist=http://mirrorlistcentosorg/?release=$releasever5&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=CentOS-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 build but not released 
[addons] 
name=CentOS-5-Addons 
#mirrorlist=http://mirrorlistcentosorg/?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 may be useful 
[extras] 
name=CentOS-5-Extras 
#mirrorlist=http://mirrorlistcentosorg/?release=4&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 
[centosplus] 
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://mirrorlistcentosorg/?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. 導(dǎo)入key

#rpm --import http://ftp.sjtu.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5 

4. 運(yùn)行,測試

#yum update 

5.clean操作

#yum clean all 

方法二:

# cd /etc/yum.repos.d/ 
#mv CentOS-Baserepo CentOS-Baserepobak 
#wget http://docslinuxtoneorg/soft/lemp/CentOS-Baserepo 
該文件內(nèi)容如下: 
[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://centosustceducn/centos/5/updates/$basearch/ 
gpgcheck=1 
gpgkey=http://mirrorcentosorg/centos/RPM-GPG-KEY-CentOS-5 
#packages used/produced in the build but not released 
[addons] 
name=CentOS-5 - Addons 
baseurl=http://centosustceducn/centos/5/addons/$basearch/ 
gpgcheck=1 
gpgkey=http://mirrorcentosorg/centos/RPM-GPG-KEY-CentOS-5 
#additional packages that may be 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://centosustceducn/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/testing/$basearch/ 
gpgcheck=1 
enabled=0 
gpgkey=http://mirrorcentosorg/centos/RPM-GPG-KEY-CentOS-5 

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • linux crontab實(shí)例分析

    linux crontab實(shí)例分析

    cron是一個linux下的定時執(zhí)行工具,可以在無需人工干預(yù)的情況下運(yùn)行作業(yè)。由于Cron 是Linux的內(nèi)置服務(wù),但它不自動起來,可以用以下的方法啟動、關(guān)閉這個服務(wù)
    2011-03-03
  • 使用?Apache?反向代理的設(shè)置技巧

    使用?Apache?反向代理的設(shè)置技巧

    這篇文章主要介紹了如何使用?Apache?設(shè)置反向代理,該模塊使用ProxyApache 配置文件中的 -prefixed 指令進(jìn)行配置。我們接下來會設(shè)置這些,需要的朋友可以參考下
    2022-01-01
  • CentOS7下安裝Scrapy步驟詳細(xì)介紹

    CentOS7下安裝Scrapy步驟詳細(xì)介紹

    這篇文章主要介紹了CentOS7下安裝Scrapy步驟詳細(xì)介紹的相關(guān)資料,需要的朋友可以參考下
    2017-05-05
  • Linux下connect超時處理(總結(jié))

    Linux下connect超時處理(總結(jié))

    這篇文章主要介紹了Linux下connect超時處理(總結(jié)),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-04-04
  • shell判斷一個變量是否為空方法總結(jié)

    shell判斷一個變量是否為空方法總結(jié)

    在本篇文章里小編給大家分享了關(guān)于shell判斷一個變量是否為空方法總結(jié)內(nèi)容,有興趣的朋友們學(xué)習(xí)下。
    2019-01-01
  • Linux下ZooKeeper分布式集群安裝教程

    Linux下ZooKeeper分布式集群安裝教程

    這篇文章主要為大家詳細(xì)介紹了Linux下ZooKeeper分布式集群安裝教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-12-12
  • Apache Thrift環(huán)境配置

    Apache Thrift環(huán)境配置

    這篇文章主要介紹了Apache Thrift環(huán)境配置的相關(guān)資料,需要的朋友可以參考下
    2017-10-10
  • Ubuntu下VIM配置成C++開發(fā)編輯器

    Ubuntu下VIM配置成C++開發(fā)編輯器

    今天小編就為大家分享一篇關(guān)于Ubuntu下VIM配置成C++開發(fā)編輯器,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
    2018-10-10
  • Linux 6下安裝編譯安裝Nginx的步驟

    Linux 6下安裝編譯安裝Nginx的步驟

    這篇文章主要介紹了Linux 6下安裝編譯安裝Nginx的步驟的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下
    2017-10-10
  • Linux 服務(wù)器分區(qū)及掛載

    Linux 服務(wù)器分區(qū)及掛載

    這篇文章主要介紹了Linux 服務(wù)器分區(qū)及掛載的相關(guān)資料,需要的朋友可以參考下
    2017-05-05

最新評論