乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

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

       fym0121 2011-03-28
      以下文章是轉載,雖然內容很多,但我們并不想制作yum。我們只是想可以用yum下載并安裝互聯(lián)網(wǎng)上的軟件包,因為紅帽沒有注冊,所以不可以用紅帽官方源,但可以用centos的,我在REDHAT5上是這樣實現(xiàn)的(相信我)
      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 并復制以下代碼(這部是重新創(chuàng)建了/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 distribution,RH 將這種升級技術利用到自己的 distribution 形成了現(xiàn)在的 yum,感覺上 yum apt 的原理類似,但是 apt 是編譯代碼,執(zhí)行效率遠高于使用 python 寫成的 yum。這是 yum 的主頁。
         yum
      的理念是使用一個中心倉庫(repository)管理一部分甚至一個 distribution 的應用程序相互關系,根據(jù)計算出來的軟件依賴關系進行相關的升級、安裝、刪除等等操作,減少了 Linux 用戶一直頭痛的 dependencies 的問題。這一點上,yum apt 相同。apt 原為 debian deb 類型軟件管理所使用,但是現(xiàn)在也能用到 RH 門下的 rpm 了。
         
      一般這類軟件通過一個或者多個配置文件描述對應的 repository 的網(wǎng)絡地址,通過 http 或者 ftp 協(xié)議在需要的時候從 repository 獲得必要的信息,下載相關的軟件包。這樣,本地用戶通過建立不同的 repository 的描述說明,在有 Internet 連接時就能方便進行系統(tǒng)的升級維護工作。另外,如果需要使用代理,可以用 http_proxy ftp_proxy 這些 shell 里面標準環(huán)境變量的設定。

      repository
      是用 yum-arch 或者 createrepo 命令創(chuàng)建的,也可以用別人已有的 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:尋找互聯(lián)網(wǎng)上的源

      大家都知道rhel想要更新軟件都是要注冊的,那么我們就不去官網(wǎng)更新!下面配置是前往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

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

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多