Welcome to

LINUX WORLD

Rohit Mehta : A Linux Follower

bangalore, Karnataka, India
hi! i m a person who is chill all time. Since jan 2008 i am working for Novell software. The word Impossible does not exist in my dictionary because Impossible says i m possible...hey guys have fun with linux...it begins but has no end......

Tuesday, November 17, 2009

How To Configure YUM Server/Yum Repository


http://funlinuxfun.blogspot.com/
linux-logo-250x300Sometimes one may find himself in dependcy resolution problem while installing rpm packages on linux. Yum(Yellowdog update manager) server is a viable solution to it which holds the repository of linux packages and allows users to take packages .Client can easily install packages with simple commands using the yum installer .Which protocol does yum uses for the tranfer of packages from client to server side?
yum uses ftp protocol for the transfer of packages from client to server side.
Configuring the yum server:
Step1:)Mount the linux dvd/iso to some preexisting directory.
#mount /dev/cdrom /mnt/
Step2:) Intsall the vsftpd package and createrepo package:
#rpm –ivh vsftpd-2.0.5-12.el5
#rpm –ivh createrepo-0.4.11-3.el5
Step3:)Copy the entire DVD to /var/ftp/pub directory:
# cp -rvf /mnt/* /var/ftp/pub/
Step4:)Move to the pub direcorty:
# cd /var/ftp/pub/
#cp Server/repodata/comps-rhel5-server-core.xml Server
# cd Server/
#createrepo -vg comps-rhel5-server-core.xml /var ftp/pub/Server
Step5:)Restart vsftpd service
#service vsftpd restart
Step6:)To enable service start at the boot time type the following command:
#chkconfig vsftpd on
yum server has been established and can be used for downloading the packages.
Configuring the yum client:
Step1:)Create the yum repository file.
#vi /etc/yum.repos.d/ser.repo
enter the following configuration lines.
[Server]
name=any meaningful name
baseurl=ftp://192.168.1.1/pub/Server #enter the ip adress of the yum server
baseurl=file:///var/ftp/pub/Server #if both client and server are same machine
gpgcheck=0
save and exit.
Now you can easily download packages using the yum command:
For more options go to man yum.conf


1 comment:

deepak said...

if i want to configure yum for the pc which is server and client both then what i shuold do.
plz give me full detail for it.

Which Linux distribution has ease of use?