Thursday 18 April 2013

YUM Server Configuration in RHEL 6 (Yellow Dog Updater Modified)


YUM Server Configuration 
                                 
Server side configuration:

Step 1:
Install createrepo.rpm from the DVD for creating repository.
#rpm -ivh createrepo.rpm
#rpm -ivh vsftpd.rpm (for FTP server)

Step 2:
Copy all rpms form the DVD and past over the hard disk share them up in NFS.
#createrepo -v  /path-to-rpms
eg:#createrepo -v /var/ftp/pub
It will take several minutes that depends upon the number of rpms that you have copied from the DVD specified and the configuration of your machine.

Step 3: 
#service vsftpd restart
Touch the following file with the contents specified.
#vim /etc/yum.repos.d/anyname.repo
[redhat]
name=rhel (or any name)
baseurl=ftp://10.10.10.101/pub/  (Give the Ipaddress of the YUM server) 
enabled=1
gpgcheck=0
:wq

Step 4:
Verify using this command
#yum repolist
Use the yum server in the same machine because server is the first client of the same service most of the times the following command is used for install gcc compiler
#yum install gcc
                                      
                                                                        
 
Client side configuration:

Touch the following file with the contents specified.
#vim /etc/yum.repos.d/somename.repo
[base]
name=rhel (or any name)
baseurl=ftp://10.10.10.101/pub/  (Give the Ipaddress of the YUM server) 
enabled=1
gpgcheck=0
:wq
#yum repolist   (just for verification)
#yum install gcc (just for an example)

No comments:

Post a Comment