RedHat 7 yum源替換

甲骨文技術支援發表於2018-01-29
 在RedHat沒有註冊的情況下,導致yum程式無法使用,提示如下,此時可用CentOS的地址進行替換

  1. This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

下面是解決辦法:

1.在/etc/yum.repos.d目錄下,建立一個檔案rhel-debuginfo.repo

  1. touch rhel-debuginfo.repo
2.編輯改檔案,新增如下內容:

  1. [base]
  2. name=CentOS-$releasever - Base
  3. baseurl=http://mirrors.163.com/centos/7/os/$basearch/
  4. gpgcheck=1
  5. gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

  6. #released updates
  7. [updates]
  8. name=CentOS-$releasever - Updates
  9. baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
  10. gpgcheck=1
  11. gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

  12. [extras]
  13. name=CentOS-$releasever - Extras
  14. baseurl=http://mirrors.163.com/centos/7/extras//$basearch/
  15. gpgcheck=1
  16. gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

  17. [centosplus]
  18. name=CentOS-$releasever - Plus
  19. baseurl=http://mirrors.163.com/centos/7/centosplus//$basearch/
  20. gpgcheck=1
  21. enabled=0

附件是nginx的yum源:

  1. [root@crm_db yum.repos.d]# more nginx.repo
  2. [nginx]
  3. name=nginx repo
  4. baseurl=http://nginx.org/packages/rhel/7/$basearch/
  5. gpgcheck=0
  6. enabled=1



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2150596/,如需轉載,請註明出處,否則將追究法律責任。

相關文章