steps to create yum server

steps to create yum server

1. insert linux dvd and mount it
#mount /dev/cdrom /mnt
or
#mount -o file.iso /mnt [ mount iso directory ]

2> copy packages
#cd /mnt
#cd Packages

3> install ftp service
#rpm -ivh vsftpd*

other packages
#rpm -ivh deltarpm*
#rpm -ivh python-deltarpm*
#rpm -ivh createrepo*

#mkdir -p /var/ftp/pub/rhel6
#cp -av * /var/ftp/pub/rhel6

4> create repodata folder
#createrepo -v /var/ftp/pub/rhel6

5> flush iptables
#iptables -F

6> #service iptables save
#service vsftpd restart
#chkconfig vsftpd on

7> edit configuration file

add below lines
[rhel6]
name=red hat linux6
baseurl=file:///var/ftp/pub/rhel6
gpgcheck=0 [disable product key]
enabled=1 [activate]

:wq

8> #yum clean all

9># yum repolist [ it show new repository rhel6]

===========================================================================
client side configuration

# vim /etc/yum.repos.d/server.repo [ any file name.repo]

add below lines

[static] any label
name=rhel
baseurl=ftp://192.168.122.1/pub/rhel6
gpgcheck=0

:wq

==========================================================================

Posted in servers

Leave a Reply