• <tfoot id="ukgsw"><input id="ukgsw"></input></tfoot>
    
    • 久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
      分享

      【yum】 自從有了yum,紅帽變得好美麗!~

       fym0121 2011-03-28
      以下文章是轉載,雖然內容很多,但我們并不想制作yum。我們只是想可以用yum下載并安裝互聯網上的軟件包,因為紅帽沒有注冊,所以不可以用紅帽官方源,但可以用centos的,我在REDHAT5上是這樣實現的(相信我)
      1、首先移動(這里用到是mv 命令,之所以用這個是不想讓這兩個文件影響下一步的操作)兩個文件
      #mv /etc/yum.conf   /etc/yum.conf.bak
      #mv /etc/yum.repos.d   /etc/yum.repos.d.bak    注:這個方法并不需要yum.repos.d 目錄,為了不讓它影響我們,將它換個名字
      2、vi   /etc/yum.conf 并復制以下代碼(這部是重新創建了/etc/yum.conf)
      [main]
      cachedir=/var/cache/yum
      keepcache=1
      debuglevel=2
      logfile=/var/log/yum.log
      pkgpolicy=newest
      distroverpkg=redhat-release
      tolerant=1
      exactarch=1
      obsoletes=1
      gpgcheck=1
      plugins=1
      metadata_expire=1800
      # PUT YOUR REPOS HERE OR IN separate files named file.repo
      # in /etc/yum.repos.d
      [base]
      name=centos-5 - Base
      baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
      # the other site: http://centos./centos/5/os/i386/
      # you can find more site in: http://www./modules/tinycontent/index.php?id=13
      enabled=1
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #released updates
      [update]
      name=CentOS-5 - Updates
      baseurl=http://mirror./centos/5/updates/i386/
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #packages used/produced in the build but not released
      [addons]
      name=CentOS-5 - Addons
      baseurl=http://mirror./centos/5/addons/$basearch/
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #additional packages that may be useful
      [extras]
      name=CentOS-5 - Extras
      baseurl=http://mirror./centos/5/extras/$basearch/
      gpgcheck=1
      gpgkey=http://mirror./centos/RPM-GPG-KEY-centos4
      #additional packages that extend functionality of existing packages
      [centosplus]
      yum yellowdog updater modified 的縮寫yellowdog 是一個 Linux distributionRH 將這種升級技術利用到自己的 distribution 形成了現在的 yum,感覺上 yum apt 的原理類似,但是 apt 是編譯代碼,執行效率遠高于使用 python 寫成的 yum。這是 yum 的主頁。
         yum
      的理念是使用一個中心倉庫(repository)管理一部分甚至一個 distribution 的應用程序相互關系,根據計算出來的軟件依賴關系進行相關的升級、安裝、刪除等等操作,減少了 Linux 用戶一直頭痛的 dependencies 的問題。這一點上,yum apt 相同。apt 原為 debian deb 類型軟件管理所使用,但是現在也能用到 RH 門下的 rpm 了。
         
      一般這類軟件通過一個或者多個配置文件描述對應的 repository 的網絡地址,通過 http 或者 ftp 協議在需要的時候從 repository 獲得必要的信息,下載相關的軟件包。這樣,本地用戶通過建立不同的 repository 的描述說明,在有 Internet 連接時就能方便進行系統的升級維護工作。另外,如果需要使用代理,可以用 http_proxy ftp_proxy 這些 shell 里面標準環境變量的設定。

      repository
      是用 yum-arch 或者 createrepo 命令創建的,也可以用別人已有的 repository 作為鏡像,這里部探討如何建立一個 repository

      相關鏈接:http://heli./5407142.html

      yum配置方案1:用于安裝hearbeat

      [root@localhost ~]# cat /etc/yum.conf

      [main]

      exclude=apache* bind-chroot courier* dovecot* exim*  mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail* wget*

      http_caching=packages

      cachedir=/var/cache/yum

      keepcache=1

      debuglevel=2

      logfile=/var/log/yum.log

      pkgpolicy=newest

      distroverpkg=redhat-release

      tolerant=1

      exactarch=1

      obsoletes=1

      gpgcheck=1

      plugins=1

      timeout=10000

      metadata_expire=1800

      # PUT YOUR REPOS HERE OR IN separate files named file.repo

      # in /etc/yum.repos.d

      #[Base]

      #name=as5-base

      #baseurl=http://centos.ustc.edu.cn/centos/5/os/i386

      #gpgcheck=1

      #gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

       

      [root@localhost ~]# cat /etc/yum.repos.d/centos.repo

      # CentOS-Base.repo

      ## This file uses a new mirrorlist system developed by Lance Davis for# CentOS.

      # The mirror system uses the connecting IP address of the client and the

      # update status of each mirror to pick mirrors that are updated to and

      # geographically close to the client. You should use this for CentOS# updates

      # unless you are manually picking other mirrors.

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

      # remarked out baseurl= line instead.

      ##

      [base]

      name=CentOS-$releasever - Base

      baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/

      gpgcheck=1

      gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

      #released updates

      [updates]

      name=CentOS-$releasever - Updates

      baseurl=http://centos.ustc.edu.cn/centos/5/updates/i386/

      gpgcheck=1

      gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

      #packages used/produced in the build but not released

      [addons]

      name=CentOS-$releasever - Addons

      baseurl=http://centos.ustc.edu.cn/centos/5/addons/i386/

      gpgcheck=1

      gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

      #additional packages that may be useful

       

      [extras]

      name=CentOS-$releasever - Extras

      baseurl=http://centos.ustc.edu.cn/centos/5/extras/i386/

      gpgcheck=1

      gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

       

      #additional packages that extend functionality of existing packages

      [centosplus]

      name=CentOS-$releasever - Plus

      baseurl=http://centos.ustc.edu.cn/centos/5/centosplus/i386/

      gpgcheck=1

      enabled=0

      gpgkey=http://mirror./centos/RPM-GPG-KEY-CentOS-5

      yum配置方案2:尋找互聯網上的源

      大家都知道rhel想要更新軟件都是要注冊的,那么我們就不去官網更新!下面配置是前往ustc.edu.cn站點更新!

      配置rhel 5 使用CentOSyum站點升級

      刪除原來的/etc/yum.conf文件和/etc/yum.repo.d目錄
      rm -rf /etc/yum.conf
      cd /etc/yum.repos.d/
      rm -rf rhel-debuginfo.repo

      vi /etc/yum.conf
      [main]

      exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail* wget*   【注意,這里定義的程序將不會被更新】
      cachedir=/var/cache/yum
      keepcache=1
      debuglevel=2
      logfile=/var/log/yum.log
      pkgpolicy=newest
      distroverpkg=redhat-release
      tolerant=1
      exactarch=1
      obsoletes=1
      gpgcheck=1
      plugins=1
      metadata_expire=1800
      # PUT YOUR REPOS HERE OR IN separate files named file.repo
      # in /etc/yum.repos.d
      [base]
      name=centos-5 - Base
      baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
      # the other site: http://centos./centos/5/os/i386/
      # you can find more site in: http://www./modules/tinycontent/index.php?id=13
      enabled=1
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #released updates
      [update]
      name=CentOS-5 - Updates
      baseurl=http://mirror./centos/5/updates/i386/
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #packages used/produced in the build but not released
      [addons]
      name=CentOS-5 - Addons
      baseurl=http://mirror./centos/5/addons/$basearch/
      gpgcheck=1
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #additional packages that may be useful
      [extras]
      name=CentOS-5 - Extras
      baseurl=http://mirror./centos/5/extras/$basearch/
      gpgcheck=1
      gpgkey=http://mirror./centos/RPM-GPG-KEY-centos4
      #additional packages that extend functionality of existing packages
      [centosplus]
      name=CentOS-5 - Plus
      baseurl=http://mirror./centos/5/centosplus/$basearch/
      gpgcheck=1
      enabled=0
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #contrib - packages by Centos Users
      [contrib]
      name=CentOS-5 - Contrib
      baseurl=http://mirror./centos/5/contrib/$basearch/
      gpgcheck=1
      enabled=0
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
      #packages in testing
      [testing]
      name=CentOS-5 - Testing
      baseurl=http://mirror./centos/5/testing/$basearch/
      gpgcheck=1
      enabled=0
      gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5


      到此就ok ,是不是很方便!!!,這個是中科大的源,號稱每隔小時跟新一次,速度確實蠻快

       

      測試下

      yum -y install system-config-date

      ok.................................

      本段參考:http://hxl2009.blog.51cto.com/779549/197359

        本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發布,不代表本站觀點。請注意甄別內容中的聯系方式、誘導購買等信息,謹防詐騙。如發現有害或侵權內容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發表

        請遵守用戶 評論公約

        類似文章 更多

        主站蜘蛛池模板: 免费人成视频网站在线18| 麻豆果冻传媒2021精品传媒一区| 午夜福利在线观看6080| 337P日本欧洲亚洲大胆精品555588| 人妻大战黑人白浆狂泄| 亚洲综合精品第一页| 欧美亚洲日本国产综合在线美利坚| 亚洲国产精品尤物YW在线观看 | 国产精成人品日日拍夜夜| 黑巨茎大战俄罗斯美女| gogo无码大胆啪啪艺术| 果冻传媒MV国产推荐视频| 26uuu另类亚洲欧美日本| 成人国产精品日本在线观看| 色一情一乱一伦麻豆| 成人无码特黄特黄AV片在线 | 99中文字幕精品国产| 欧美综合人人做人人爱| 无码国内精品久久人妻蜜桃| 国产AV无码专区亚洲AV潘金链| 亚洲国产成人无码电影| 亚洲男女内射在线播放| 中文字幕人妻日韩精品| 一本色道久久88亚洲精品综合| 国产乱子伦视频在线播放| 再深点灬舒服灬太大了网站| 东京热大乱系列无码| 午夜成人性爽爽免费视频| 男人把女人桶爽30分钟| 久久亚洲国产精品久久| 天天日天天谢天天视2019天干| 国产富婆推油SPA高潮了| 四虎影视一区二区精品| 久久久久久亚洲精品成人| 亚洲欧美人成电影在线观看| 奇米网777色在线精品| 精品国精品自拍自在线| 成人做受120秒试看试看视频| 2020无码专区人妻系列日韩| 又大又粗又硬放不进去了| 国产精成人品日日拍夜夜|