当前位置:   article > 正文

redhat6.6 64位系统安装yum(二)_redhat6.6 安装yum

redhat6.6 安装yum

感谢博主分享,原文链接:https://blog.csdn.net/qq_37791764/article/details/78966277

redhat默认自带的yum源需要注册,才能更新,报错: 
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager 
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 
http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found” 
Trying other mirror. 
可替换为centos对应的源。

CentOS6-Base-163.repo 替换后的文件内容()

  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client. You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #
  12. [base]
  13. name=CentOS-6 - Base - 163.com
  14. baseurl=http://mirrors.163.com/centos/6/os/$basearch/
  15. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
  16. gpgcheck=1
  17. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  18. #released updates
  19. [updates]
  20. name=CentOS-6 - Updates - 163.com
  21. baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
  22. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
  23. gpgcheck=1
  24. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-6 - Extras - 163.com
  28. baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
  29. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
  30. gpgcheck=1
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-6 - Plus - 163.com
  35. baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
  36. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  40. #contrib - packages by Centos Users
  41. [contrib]
  42. name=CentOS-6 - Contrib - 163.com
  43. baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
  44. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
  45. gpgcheck=1
  46. enabled=0
  47. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

更换yum源,将原有源删除或备份到别的目下下:

  1. cd /etc/yum.repos.d/
  2. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
  3. vi CentOS6-Base-163.repo 编辑文件,把文件里面的$releasever全部替换为版本号:6(注意,不是6.5!)最后保存!
  4. 替换命令: %s/$releasever/6/g

清除原有缓存,重建缓存: 
#yum clean all 
#yum makecache

更新系统(以上步骤完成后可先尝试yum是否能用, 不能用在使用该命令。 该命令执行很长时间)
#yum update

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/168779
推荐阅读
相关标签
  

闽ICP备14008679号