温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

linux中yum源配置文件的示例分析

发布时间:2021-10-26 11:18:21 来源:亿速云 阅读:119 作者:小新 栏目:建站服务器

这篇文章将为大家详细讲解有关linux中yum源配置文件的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

/etc/yum.conf文件

  1. [main]

  2. cachedir=/var/cache/yum/$basearch/$releasever

  3. keepcache=0

  4. debuglevel=2

  5. logfile=/var/log/yum.log

  6. exactarch=1

  7. retries=6

  8. obsoletes=1

  9. gpgcheck=0

  10. plugins=1

  11. installonly_limit=5

  12. bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.ph

  13. p?category=yum

  14. distroverpkg=centos-release


  15. #  This is the default, if you make this bigger yum won't see if the metadata

  16. # is newer on the remote and so you'll "gain" the bandwidth of not having to

  17. # download the new metadata and "pay" for it by yum not having correct

  18. # information.

  19. #  It is esp. important, to have correct metadata, for distributions like

  20. # Fedora which don't keep old packages around. If you don't like this checking

  21. # interupting your command line usage, it's much better to have something

  22. # manually check the metadata once an hour (yum-updatesd will do this).

  23. # metadata_expire=90m


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

  25. # in /etc/yum.repos.d

/etc/yum.repos.d/yum.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-$releasever - Base - 163.com

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

  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Updates - 163.com

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

  22. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Extras - 163.com

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

  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Plus - 163.com

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

  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Contrib - 163.com

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

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

  45. gpgcheck=1

  46. enabled=0

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

关于“linux中yum源配置文件的示例分析”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI