Home > HOWTOs > Saving ‘yum install’ Packages

Saving ‘yum install’ Packages

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]$

Advertisements
Categories: HOWTOs
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: