Configure YUM in RHEL6

mount RHEL6 DVD
mount /dev/dvd /mnt

 

go to the mounted directory
cd /mnt/Packages/

 

Install FTP package
rpm -ivh vsftpd-2.2.2-6.el6.x86_64.rpm

 

Install createrepo package
rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm

 

copy packages directory to /var/ftp/pub/ location
cp -r /mnt/Packages /var/ftp/pub/

 

create a new repository for copied files using command Createrepo:
createrepo /var/ftp/pub/Packages

 

now create & configure .repo file in the following location
cd /etc/yum.repos.d/
create any file with .(dot) as extension
vi rhel6.repo

 

Add the following configuration lines in it.
[server]
name=server1
baseurl=file:///var/ftp/pub/Packages
enabled=1
gpgcheck=0

 

Note:Above rhel6.repo file configuration is set in any rhel machine that access repo locally.

 

To install packages in client machine from server repo add the following lines in server as well us  in client machines .

 

[server]
name=server1
baseurl=ftp://192.168.3.199/Packages
enabled=1
gpgcheck=0

 

Leave a Comment