Mirror RHN update RPM with mrepo
id : it55w4770p
category : computer
blog : unixlinux
created : 12/22/10 - 09:06:48
Installation
  • First of all, install mrepo (this rpm is available in epel repositories) :
# yum install -y mrepo

Systemid
  • Create directory where you want to put your rpm :
# mkdir -p /repositories/rhel5-x86_64/

  • Generate your system ID, you need to have a valid RHN username/login to do this :
# gensystemid -u ****** -p ****** -release=5Server --arch=x86_64 /repositories/rhel5-x86_64

  • This command will generate a valid system ID
  • u : username
  • p : password
  • release : {5Server,5Server,4Server}
  • arch : {i386,x86_64}
mrepo.conf
  • Modify your mrepo.conf :
# vi /etc/mrepo.conf
### Configuration file for mrepo

### The [main] section allows to override mrepo's default settings
### The mrepo-example.conf gives an overview of all the possible settings
[main]
srcdir = /repositories/
wwwdir = /var/www/mrepo
confdir = /etc/mrepo.conf.d
arch = i386 x86_64

mailto = root@localhost
smtp-server = localhost

rhnlogin = ******:******
http_proxy = http://******:******@xxx.xxx.xxx.xxx:xx

### Any other section is considered a definition for a distribution
### You can put distribution sections in /etc/mrepo.conf.d/
### Examples can be found in the documentation at:
### /usr/share/doc/mrepo-0.8.7/dists/.
[rhel5]
name = Red Hat Enterprise Server $release ($arch)
release = 5
arch = x86_64
metadata = yum repomd repoview

updates = rhn:///rhel-$arch-server-$release
#fastrack = rhn:///rhel-$arch-server-fastrack-$release
#supplementary = rhn:///rhel-$arch-server-supplementary-$release
#virtualization = rhn:///rhel-$arch-server-vt-$release
#rhn-tools = rhn:///rhn-tools-rhel-$arch-server-$release

Synchronize
# mrepo -guvvv