Yellow Dog Updater Modified or YUM is advanced way of installing the packages in Linux distro’s such as Fedora, CenOS and Red-hat, This is came after RHEL4.
It is use for automatic resolution of software dependencies. If a package installation or upgrade request is made and requires the installation or upgrade of additional packages.
It can be configured to look for software packages in more than one location at a time.
Here I am going to configure Yum Server with FTP method and client and also some useful command, Its can be configured with other method also like http.
Please have a look :- 🙂
On Server end configuration:-
Mount your O/S dvd :-
#mount /dev/cdrom /mnt <– Here cdrom is my local cdrom device
Install createrepo.rpm for creating repository from your DVD.
# cd /mnt/Server
#rpm -ivh createrepo-0.9.8-5.el6.noarch.rpm <— This is package is used to create our local repository.
Note:- in Rhel 6 May It will give error like ( dependency problem. Then we need to install all missing dependencies first )
for example:-
#rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm <— install missing You may be faced one or more missing dependencies for fix you need to install their rpm package
#rpm -ivh vsftpd.rpm <——-for FTP server
Copy all rpms form the DVD in to /var/ftp/pub/Server. <– here Server is a dir under /var/ftp/pub/Server
#cp -pvr /mnt/Server/* /var/ftp/pub/Server/
#createrepo /var/ftp/pub/Server <— Create the repository
It will take several minutes that depends upon the number of rpms that you have copied from the DVD .
Note:- You have add or copy rpms latter then you need to run that command again for create repository for added rpms ..
Restart FTP Service :-
#service vsftpd restart
#chkconfig vsftpd on
Create the file with .repo extension with Yum detail :-
#vim /etc/yum.repos.d/server.repo
[Server repo] <— Repository name
name= test <— Information about the repo
baseurl=ftp://192.168.1.10/pub/Server <- url of Yum , 192.168.1.10 is the IP add of Yum Server
enabled=1
gpgcheck=0 <– use to check the authentication of the repo here is disabled
:wq!
Save and Quit
Now check
# yum clean all
#yum install gcc <– Just for Example
Now Client end Configuration :-
Client side configuration:
Create a repo file :-
#vim /etc/yum.repos.d/client.repo
[base]
name=test
baseurl=ftp://192.168.1.10/pub/Server  (Give the ipaddress of the YUM server)Â
enabled=1
gpgcheck=0
:wq!
Save and quit
 Some Useful YUM Commands :-
Install package by using Yum:-
#yum install httpd <—– for Example http installation
Removing package command :-
#yum remove firefox or yum remove firefox -y Note :- If you type -y Its will remove with asking you .. Update the package :- #yum update php
List a Package using YUM
#yum list mysql
You can also search package by using Yum
#yum search httpd
List all Installed Packages
#yum list installed | less
List all Available Packages
#yum list | less
Now Your Yum is working fine 🙂
Shahil
Just Love Linux
               Enjoy Linux-Ing 🙂 🙂 🙂
