yum安装软件很方便,但是下载下来的rpm包在安装后默认会被删除掉:
如果希望保留yum安装的软件包该如何做呢?
设置方法:
将/etc/yum.conf里对应的keepcache参数改为1即可,然后用yum安装软件,rpm包便会保留在cachedir对应的目录下
[root@awstats ~]# cp /etc/yum.conf{,.`date +%F`} -rw-r--r-- 1 root root 969 Apr 14 16:19 /etc/yum.conf -rw-r--r-- 1 root root 969 Apr 14 16:19 /etc/yum.conf.20150414 # sed -i 's#keepcache=0#keepcache=1#g' /etc/yum.conf # sed -n '2,3p' /etc/yum.conf cachedir=/var/cache/yum/$basearch/$releasever keepcache=1