Saving Packages when doing a yum installation. These packages can be used again on a different server without having to download them again.
sudo vim /etc/yum.conf
[main] cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
… #some more details here …
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
Change the line `keepcache=0` to `keepcache=1` This cache all the data in 'cachedir' location.
Some test here.
[zabbix@localhost yum]$ sudo yum install yum-plugin-downloadonly
...
[zabbix@localhost yum]$ pwd
/var/cache/yum
[zabbix@localhost yum]$ find . -name '*.rpm' -print | grep yum
./x86_64/6/base/packages/yum-utils-1.1.30-30.el6.noarch.rpm
./x86_64/6/base/packages/yum-plugin-downloadonly-1.1.30-30.el6.noarch.rpm
./x86_64/6/base/packages/yum-3.2.29-60.el6.centos.noarch.rpm
[zabbix@localhost yum]$
sudo vim /etc/yum.conf
[main] cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
… #some more details here …
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
Change the line `keepcache=0` to `keepcache=1` This cache all the data in 'cachedir' location.
Some test here.
[zabbix@localhost yum]$ sudo yum install yum-plugin-downloadonly
...
[zabbix@localhost yum]$ pwd
/var/cache/yum
[zabbix@localhost yum]$ find . -name '*.rpm' -print | grep yum
./x86_64/6/base/packages/yum-utils-1.1.30-30.el6.noarch.rpm
./x86_64/6/base/packages/yum-plugin-downloadonly-1.1.30-30.el6.noarch.rpm
./x86_64/6/base/packages/yum-3.2.29-60.el6.centos.noarch.rpm
[zabbix@localhost yum]$
Comments
Post a Comment