Sunday, 30 September 2012

how to create yum server in linux

Firstly mount the DVD on any mount point:

#mount /dev/cdrom /mnt              (mount your cd or iso on /mnt )

#cd /mnt                          (go to the directory

#ls                               (list the file

#rpm -ivh createrepo* +use tab) (install this rpm through command to make default directory /var/ftp/pub

#cp -rav * /var/ftp/pub           (copy to content in /pub directory

#cd /var/ftp/pub                   (go to the /pub

#createrepo* /pub           (create repository in pub

#vi /etc/yum.repos.d/server.repo (Create a file with extn. .repo)

[server]
name= This is yum Server(for our information)
baseurl=file:///var/ftp/pub/
gpgcheck=0
enabled=1

:wq!

(save and exit)
 

#yum clean all              (to clean the errors in repository

#yum list all                 (display all rpm )