Configurar un repositorio YUM

1. Montar el DVD y copiar el contenido a un directorio
mount -o loop rhel-server-5.6-x86_64-dvd.iso /mnt/disco/
cd /mnt/disco/Packages/
rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
mkdir -p /var/www/html/iso/
cp -r /mnt/disco/Packages/* /var/www/html/iso/

2. Configurar el repositorio
vim /etc/yum.repos.d/repositorio.repo
[base]
name=Red Hat Enterprise Linux $releasever - $basearch - Base
baseurl=file:///var/www/html/iso
gpgcheck=0
enabled=1

3. Crear el repomd (xml-rpm-metadata)
/var/www/html/iso
createrepo .
yum update/etc/yum.repos.d/repositorio.repo

4. En los otros servidores que están dentro de la misma subred se hace lo siguiente:
vim /etc/yum.repos.d/repositorio.repo
[base]
name=Red Hat Enterprise Linux $releasever - $basearch - Base
baseurl=http://192.168.1.1/iso
gpgcheck=0
enabled=1

Advertisement
  1. Dejar un comentario

Deja un comentario

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

Logo de WordPress.com

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

Twitter picture

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

Facebook photo

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

Connecting to %s

Seguir

Get every new post delivered to your Inbox.