ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【linux】yum源配置文件(服务端)

【linux】yum源配置文件(服务端)

原创 Linux操作系统 作者:ringoo_ming 时间:2017-03-17 14:14:26 0 删除 编辑

/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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31442725/viewspace-2135533/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
没啥特别的,就是一个搬砖人

注册时间:2017-03-10

  • 博文量
    40
  • 访问量
    114067