CentOSyum不能用

來源:互聯網
上載者:User

   修改/etc/yum.repos.d/Centos-Base.repo

  # CentOS-Base.repo

  #

  # 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 - 163.com

  baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/

  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

  gpgcheck=1

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

  #released updates

  [updates]

  name=CentOS-$releasever - Updates - 163.com

  baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/

  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

  gpgcheck=1

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

  #additional packages that may be useful

  [extras]

  name=CentOS-$releasever - Extras - 163.com

  baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/

  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

  gpgcheck=1

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

  #additional packages that extend functionality of existing packages

  [centosplus]

  name=CentOS-$releasever - Plus - 163.com

  baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/

  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

  gpgcheck=1

  enabled=0

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

  #contrib - packages by Centos Users

  [contrib]

  name=CentOS-$releasever - Contrib - 163.com

  baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/

  #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

  gpgcheck=1

  enabled=0

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

  檔案免費下載地址:http://download.csdn.net/detail/chenyiming_1990/7032825

  centos /etc/yum.repo.d/中.repo源的配置與編寫詳解

  # CentOS-Base.repo

  #

  # 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 //所使用的.repo檔案的名字

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

  #mirrorlist 是由 yum 程式自行去捉映射月台, baseurl 則是指定固定的一個容器網址

  #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

  #其中url支援的協議有 http:// ftp:// file://三種。baseurl後可以跟多個url,你可以自己改為速度比較快的鏡像站,但baseurl只能有一個

  gpgcheck=1 #gpg簽名檢查

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  #gpg密鑰的位置,應指定原生密鑰檔案只有可以與伺服器上的密鑰進行校正。

  #released updates

  #該段指向的路徑是軟體升級時需要的軟體包

  [updates]

  name=CentOS-$releasever - Updates

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

  //該路徑對應伺服器上的update檔案夾,即自動到伺服器updates檔案夾裡找軟體包

  #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/

  gpgcheck=1

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  #packages used/produced in the build but not released

  #該段指向的路徑是已經使用了或者已經製作出來的軟體,但並沒有發行

  [addons]

  name=CentOS-$releasever - Addons

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

  #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/

  gpgcheck=1

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  #additional packages that may be useful

  #該段指向的路徑是可能有用的其他的軟體

  [extras]

  name=CentOS-$releasever - Extras

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

  #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/

  gpgcheck=1

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  #additional packages that extend functionality of existing packages

  #該段指向的路徑是已經存在的軟體的擴充軟體、外掛程式等等

  [centosplus]

  name=CentOS-$releasever - Plus

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

  #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/

  gpgcheck=1

  enabled=0 #enabled=0表示這個源停用 如果enabled不寫 表示enabled=1

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

  #contrib - packages by Centos Users

  #該段指向的路徑是系統使用者所貢獻的軟體

  [contrib]

  name=CentOS-$releasever - Contrib

  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

  #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/

  gpgcheck=1

  enabled=0

  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

相關文章

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。