[CentOS] copying to a local mirror / repository

Wed Oct 14 22:53:47 UTC 2015
Johnny Hughes <johnny at centos.org>

On 10/14/2015 04:49 PM, Richer, Mark (CIV) wrote:
> I am using CentOS on a private network which can’t access the Internet so I want to create a local repository of packages on one or more DVDs, and get it installed on the private network. Someone had done this for CentOS 7, but not for CentOS 6. I have a VM running 6 so I am trying to create it for the previous major version.  I thought there would be some obvious instructions on the preferred/recommended method for doing this, but I have failed to find them.
> 
> Can anyone respond with any useful links on how best to do this or provide the recommended set of steps. I have seen various postings on this topic, but not anything official from the CentOS community.
> 
> thanks much,
> Mark

For CentOS-7 this is quite easy, mount the everything ISO and point to
it.  (Note, it is TOO BIG to fit on a DVD, so it needs to be on a thumb
drive .. something that will hold at least 7.2 GB)

We roll a new ISO every month, you can get the latest one here:

http://buildlogs.centos.org/rolling/7/isos/x86_64/

Currently CentOS-7-x86_64-Everything-1509-01.iso

For 6, it is a bit harder, but not overly hard.  Pick a mirror that is
close from here:

https://www.centos.org/download/mirrors/

Rsync the /6/ tree from that mirror, excluding the ISOs if you do not
want them.  As an example, I will pick the mirrors.kernel.org for this
example ... this command:

rsync mirrors.kernel.org::centos/6/

shows this results:

drwxr-xr-x          27 2014/10/19 16:36:15 SCL
drwxrwxr-x          42 2015/07/28 04:57:54 centosplus
drwxrwxr-x          27 2015/05/18 11:02:50 cloud
drwxr-xr-x          42 2014/10/19 16:36:15 contrib
drwxrwxr-x          42 2015/08/05 07:44:48 cr
drwxr-xr-x          42 2014/10/19 16:36:15 extras
drwxr-xr-x          42 2014/10/19 16:36:15 fasttrack
drwxrwxr-x          42 2015/08/10 11:56:29 isos
drwxr-xr-x          42 2015/07/25 08:20:23 os
drwxrwxr-x          42 2015/08/03 05:39:35 updates
drwxr-xr-x          27 2014/10/19 16:36:15 xen4


So, you can exlude all except the trees you want, and rsync the rest.

Put the os and updates directories (also bigger than 4.7  GB) on a drive
and mount it somewhere on the other network.

You can also do the same thing with the 7/ directory.

With both the 6 or 7 directories, you just use apache to show the
directories and and update from them by pointing to that location on
your remote network.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20151014/182259dd/attachment-0005.sig>