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

linux下配置yum源方法詳解

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

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

方法一:

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中定時任務(wù)crond命令使用方法

    linux中定時任務(wù)crond命令使用方法

    這篇文章主要為大家詳細(xì)介紹了linux中定時任務(wù)crond命令的使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-02-02
  • 在Apache服務(wù)器上啟用GZip壓縮靜態(tài)內(nèi)容的方法

    在Apache服務(wù)器上啟用GZip壓縮靜態(tài)內(nèi)容的方法

    這篇文章主要介紹了在Apache服務(wù)器上啟用GZip壓縮靜態(tài)內(nèi)容的方法,通過配置.htaccess文件即可輕松實(shí)現(xiàn),同時附帶了一些GZip的常用命令,需要的朋友可以參考下
    2015-08-08
  • Linux上通過SSH掛載遠(yuǎn)程文件系統(tǒng)方法詳解

    Linux上通過SSH掛載遠(yuǎn)程文件系統(tǒng)方法詳解

    在本篇內(nèi)容里小編給大家整理了關(guān)于在Linux上通過SSH掛載遠(yuǎn)程文件系統(tǒng)的相關(guān)知識點(diǎn),需要的朋友們跟著學(xué)習(xí)下。
    2019-03-03
  • 詳解CentOS 7 網(wǎng)卡命名修改為eth0格式

    詳解CentOS 7 網(wǎng)卡命名修改為eth0格式

    這篇文章主要介紹了詳解CentOS 7 網(wǎng)卡命名修改為eth0格式,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-03-03
  • Linux查看log日志常用命令

    Linux查看log日志常用命令

    Linux日志存儲在/var/log目錄中,我們可以編寫腳本,來掃描這些日志,并基于它們的內(nèi)容去自動執(zhí)行某些功能,Linux查看日志的命令有多種:?tail、head、cat、more、less、sed等
    2024-06-06
  • 在Apache上隱藏服務(wù)器簽名的方法

    在Apache上隱藏服務(wù)器簽名的方法

    這篇文章主要介紹了在Apache上隱藏服務(wù)器簽名的方法,示例基于Debian系的Linux,需要的朋友可以參考下
    2015-06-06
  • Apache Web服務(wù)器安全配置全攻略

    Apache Web服務(wù)器安全配置全攻略

    作為最流行的Web服務(wù)器,Apache Server提供了較好的安全特性,使其能夠應(yīng)對可能的安全威脅和信息泄漏
    2012-11-11
  • 詳解CentOS7.0安裝與配置Tomcat-7

    詳解CentOS7.0安裝與配置Tomcat-7

    本篇文章主要介紹了CentOS7.0安裝與配置Tomcat-7,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-01-01
  • htaccess Rewrite中文編碼問題解決方法

    htaccess Rewrite中文編碼問題解決方法

    Seo方面對于中文地址或則文件名,在Google好像比重要大一些,今天正好看到andy的文章.轉(zhuǎn)下,以后也許會用.
    2008-10-10
  • CentOS8.0 網(wǎng)絡(luò)配置的實(shí)現(xiàn)

    CentOS8.0 網(wǎng)絡(luò)配置的實(shí)現(xiàn)

    這篇文章主要介紹了CentOS8.0 網(wǎng)絡(luò)配置的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-10-10

最新評論