Tuesday, January 5, 2010

Creating DVD repository for own system or server

1st Mount RHEL5 dvd

1)check :

#rpm -qa | grep vsftpd

-if /var/ftp directory didn't there means install

#rpm -ivh /media/RHEL5/Server/vsftpd* ( this is location of file in mounted dvd )


2) check :

#rpm -qa | grep createrepo

-if createrepo command not installed means install

#rpm -ivh /media/RHEL5/Server/createrepo* ( this is location of file in mounted dvd )


3)Copy dvd/cd files to pub:

#cp -avf /media/RHEL/* /var/ftp/pub/


4)copy grouping files:

#cp /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /root

#cp /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /root


5)clear the old repos:

#rm -rf /var/ftp/pub/Server/repodata

#rm -rf /var/ftp/pub/VT/repodata


6)repo creation:

#createrepo -g /root/comps-rhel5-server-core.xml -v /var/ftp/pub/Server

#createrepo -g /root/comps-rhel5-vt.xml -v /var/ftp/pub/VT


7) create a file called :

for server:

#vim /etc/yum.repos.d/server1.repo

[Server]

name=Server1 Server Repository

baseurl=file:///var/ftp/pub/Server

gpgcheck=0

#This one is needed for xen packages

[VT]

name=Server1 VT Repository

baseurl=file:///var/ftp/pub/VT

gpgcheck=0


for client:

#vim /etc/yum.repos.d/client.repo

[Server]

name=Server1 Server Repository

baseurl=ftp://192.168.0.254/pub/Server

gpgcheck=0

# This one is needed for xen packages

[VT]

name=Server1 VT Repository

baseurl=ftp://192.168.0.254/pub/VT

gpgcheck=0


8) checking

#yum clean all

#yum install

No comments: