Citation: http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/10/09/2203916.html
$ cat/etc/yum.conf [main]
Cachedir=/var/cache/yum #yum下载的RPM包的缓存目录
Keepcache=0 #缓存是否保存, 1 save, 0 not saved.
debuglevel=2 #调试级别 (0-10), default is 2 (specific debug level of application, I do not understand).
Logfile=/var/log/yum.log #yum的日志文件所在的位置
Exactarch=1 #在更新的时候 whether to allow updating different versions of RPM packages, such as whether to update i686 RPM packages on i386.
Obsoletes=1 #这是一个update的参数, please refer to Yum (8), which is simply equivalent to upgrade, allowing the updating of stale RPM packages.
Gpgcheck=1 #是否检查GPG (GNU Private Guard), a key-mode signature.
Plugins=1 #是否允许使用插件, the default is 0 is not allowed, but we generally use yum-fastestmirror this plugin.
Installonly_limit=3 #允许保留多少个内核包.
exclude=selinux* #屏蔽不想更新的RPM包, wildcards can be used, separated by a space between multiple RPM packages.
# This is the default and if you do this bigger Yum won ' t see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not have to
# Download the new metadata and ' pay ' for it by Yum don't have correct
# information.
# It is the esp. important, to has correct metadata, for distributions like
# Fedora which don ' t keep old packages around. If you don ' t like this checking
# interupting your command line usage, it's much better to has something
# Manually check the metadata once an hour (Yum-updatesd'll do).
metadata_expire=90m #设定保存时长
# PUT YOUR REPOS here or in separate files named File.repo
# IN/ETC/YUM.REPOS.D
Yum Cache Configuration