Tuesday, November 18, 2008

How to configure Yum Server & Client Configuration

Few days back, We were creating a network for an institute. I had installed a Linux workstation on LAN but after installation I need to install some more packages as per the requirement of client. Though I need to copy packages from CD’s again n again and due to unavailability of Internet, I was unable to use yum update/install from internet.

It was a repeated task for me to do on all workstations, so I made my own YUM SERVER which was very helpful for me to install workstation and update any package through my YUM Server.

Then I thought to share my experience with all my friends who are using Linux and face same kind of conditions and waste our time in installing dependencies n all.

This is the quickest and short method to finish our work in time.

Yum Configuration

For making YUM SERVER

First copy to cd/dvd in the directory /var/ftp/pub

#mount /dev/cdrom /mnt
#cp -rvf /mnt/* /var/ftp/pub
#cd /var/ftp/pub
#cp Server/repodata/……… .xml Server
#cp VT/repodata/………….xml VT
#cp Cluster/repodata/……….xml Cluster
#cp ClusterStorage/repodata/……….xml ClusterStorage
#
#rpm -ivh createrepo.......................
#createrepo -vg ………….xml Server
#createrepo -vg ………….xml VT
#createrepo -vg ………….xml Cluster
#createrepo -vg ………….xml ClusterStorage

#cd /etc/yum.repos.d
#vi server.repo
[Server]
name= Yum Server Repository
baseurl=file:///var/ftp/pub/Server
gpgcheck=0

[VT]
name=Yum VT Server
baseurl=file:///var/ftp/pub/Server
gpgcheck=0

[Cluster]
name=Yum Cluster Server
baseurl=file:///var/ftp/pub/Cluster
gpgcheck=0

[ClusterStorage]
name=Yum ClusterStorage Server
baseurl=file:///var/ftp/pub/ClusterStorage
gpgcheck=0

#yum clean all
#yum list
#yum grouplist

Now here you can see your yum is working.

OK.

Now u test it so install any package.

#yum install system-config-kickstart*

If you want to install a group

#yum groupinstall “Virtualization”

if u want to remove it then

#yum remove system-config-kickstart*

Now Server configurations are done.

Its time to configure on client machine


For making CLIENT

#chkconfig vsftpd on

make a repository file
#cd /etc/repos.d

#vi client.repo

[Server]
name=client server yum
baseurl=ftp://x.x.x.x/pub/Server
gpgcheck=0

[VT]
name=client server yum
baseurl=ftp://x.x.x.x/pub/VT
gpgcheck=0

[Cluster]
name=client server yum
baseurl=ftp://x.x.x.x/pub/Cluster
gpgcheck=0

[ClusterStorage]
name=client server yum
baseurl=ftp://x.x.x.x/pub/ClusterStorage
gpgcheck=0

#yum list




Now u install any package or you go to GUI and see add remove program its working fine and package option are coming that means ok. But note it client should be connected to server in LAN.

Hope, you will also got help from my experience. In case you need any kind of help, please mail me on gaur.vibhor@gmail.com.

No comments: