来自http://idobest.pixnet.net/blog/post/24193794

在Redhat版本中,使用yum 來下載RPM套件

所下載的檔案,預設是存放在 /var/cache/yum/

but!雖然知道檔案放在那個路徑下,但是系統預設是不會保留yum 所下載的檔案

需要修改 /etc/yum.conf 檔案

以下是 yum.conf 內容

[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h
# Default.
# installonly_limit = 3
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

想要保留 yum下載的RPM檔案,記得把上面的 keepcache參數設為 1即可。

作者 龙飞