Advertisements

Mirroring RHN repositories

To mirror the repository for RHEL 5, run the command below

root@rhel5:~# reposync -p /redhat –repoid=rhel-x86_64-server-5 -l

[rhel-x86_64-server-5: 12937 of 16070 ] Skipping existing getPackage/samba3x-3.6.6-0.139.el5_10.x86_64.rpm
[rhel-x86_64-server-5: 12938 of 16070 ] Downloading getPackage/samba3x-3.6.6-0.140.el5_10.x86_64.rpm
samba3x-3.6.6-0.140.el5_10.x86_64.rpm | 5.9 MB 00:25
[rhel-x86_64-server-5: 12939 of 16070 ] Skipping existing getPackage/samba3x-client-3.3.8-0.51.el5.x86_64.rpm

It will create a directory with the name of the channel

root@rhel5:~# ls -l /redhat
total 2914724
drwxr-xr-x 3 root root 4096 Jul 31 2013 rhel-x86_64-server-5

After you download all the packages, create the database for the packages

root@rhel5:~ # createrepo –database /redhat/rhel-x86_64-server-5/getPackage/
16070/16070 – gcc-objc++-4.1.2-46.el5.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata

And verify it to see if there is a problem

root@rhel5:~ # verifytree /redhat/rhel-x86_64-server-5/getPackage/
Loaded plugins: product-id, rhnplugin
Checking repodata:
verifying repomd.xml with yum
verifying filelists checksum
verifying primary checksum
verifying primary_db checksum
verifying other_db checksum
verifying other checksum
verifying filelists_db checksum
Checking groups (comps.xml):
verifying comps.xml with yum
comps file missing or unparseable

As of today, July 17th 2014, you need 34GB for RHEL 5

root@rhel5:/redhat/rhel-x86_64-server-5 # du -sh .
34G .

Same steps for Red Hat Enterprise Linux 6

root@rhel6:~ # reposync -p /redhat –repoid=rhel-x86_64-server-6 -l

root@rhel6:~ # createrepo –database /redhat/rhel-x86_64-server-6/getPackage/
Spawning worker 0 with 12900 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

root@rhel6:~ # verifytree /redhat/rhel-x86_64-server-6/getPackage/
Loaded plugins: product-id, refresh-packagekit, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Checking repodata:
verifying repomd.xml with yum
verifying filelists checksum
verifying primary checksum
verifying other checksum
verifying filelists_db checksum
verifying primary_db checksum
verifying other_db checksum
Checking groups (comps.xml):
verifying comps.xml with yum
comps file missing or unparseable

As of today, July 17th 2014, you need 21GB for RHEL 6

root@rhel6:/redhat/rhel-x86_64-server-6/getPackage # du -sh .
21G .

Advertisements
%d bloggers like this: