Wednesday, 29 May 2013

How to configure Yum server in Rhel5, Rhel6,


                                             How to configure Yum server in Rhel6

What is Yum Server?

YUM stands for Yellow dog Updater Modified, is a easy way to install, update  rpm packages on linux operating system and also there dependencies automatically.

Why is need?

In RHEL4 installing packages is a tedious process, some times its headache to install all the dependencies. So Red-hat come with a solution to overcome this dependencies problem in most situations, the solution for this is nothing but YUM implementation. This will resolve this dependency issue and other known issues.

In Rhel we can create two type of yum servers.


  • Local yum server
  • Sharing yum server  

Now I am going to configure local yum server.

1. First you create the directory where you copy the DVD.

root@localhost#] mkdir /yum

mount the DVD

root@localhost#] mount /media/DVD /yum
root@localhost#] cd /media/DVD
root@localhost#] cp -rv * /yum

now create the repo file for yum server

root@localhost#] vim /etc/yum.repos.d/server.repo
[yum]
name=yum
baseurl=file:///yum
enabled=1
gpgcheck=0

After you can check it by using this command

root@localhost#] yum list all

Now I am going to create sharing yum server in linux

We can use yum server in network as yum client through FTP and HTTP.

First you install vsftpd package for FTP

root@localhost#] rpm -ivh vsftpd

after that you mount the DVD as you want like mnt

root@localhots#] mount /media/DVD /mnt

and copy it into ftp default location.

root@localhost#] cd /mnt

root@localhost#] cp -rv * /var/ftp/pub

Now create the repo file in server

root@localhost#] vim /etc/yum.repos.d/server.repo
[server]
name=yum
baseurl=file:///var/ftp/pub
gpgcheck=0

Now if client want to use yum sverer then he can used through FTP or HTTP

On client side

root@localhost#] vim /etc/yum.repos.d/client.repo
[server]
name=yum
baseurl=ftp://192.168.2.1/pub/
gpgcheck=0

Now you can check it through command

root@localhost#] yum list all

We can do same from httpd

No comments:

Post a Comment