[root@Durian etc]# nl 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 obsoletes=1
8 gpgcheck=1
9 plugins=1
10installonly_limit=5
11bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
12distroverpkg=centos-release
13# This is the default, if you make this bigger yum won't see if the metadata
14# is newer on the remote and so you'll "gain" the bandwidth of not having to
15# download the new metadata and "pay" for it by yum not having correct
16# information.
17# It is esp. important, to have correct metadata, for distributions like
18# Fedora which don't keep old packages around. If you don't like this checking
19# interupting your command line usage, it's much better to have something
20# manually check the metadata once an hour (yum-updatesd will do this).
21# metadata_expire=90m
22# PUT YOUR REPOS HERE OR IN separate files named file.repo
23# in /etc/yum.repos.d
来源: http://www.linuxidc.com/Linux/2017-10/147258.htm