Tuesday, September 18, 2012

YUM (Yellow Dog Updater Modified) Configuration in RHEL 5

YUM Server Configuration in RHEL5 (Yellow Dog Updater Modified)


YUM configuration Includes 3 Steps:
STEP 1:
Mount the RHEL 5 Dvd for ISO file to /mnt 
Install vsftpd and Creterepo packages from RHEL Dvd
# rpm -ivh vsftpd.xxxx.rpm
# rpm -ivh createrepo.xxx.rpm


STEP 2: 
Copy all rpms form the DVD /Server  folder to /var/ftp/pub Location
#cp -av /mnt/Server /var/ftp/pub 

After copying the all rpms to ftp location, we need to create local repository database for that we need to rum the following command

#createrepo -v /var/ftp/pub/Server

It will take several minutes that depends upon the number of rpms that you have copied from the DVD specified and the configuration of your server

Now it time to create repository file which indicates repository location and repository parameters

STEP 3 :
Creating a repo file

#vim /etc/yum.repos.d/local.repo
[Note:repo filename can be anything]

[local.repo]
name=my repo
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0

:wq! save and exit

[Note:repo name (taking above parameters) "local.repo" , it should not have any spaces,u can put "-" or "." or anything] 

open a file
#vim /etc/yum.conf
make sure gpgcheck=0

:wq! save and exit

#yum clean all
#yum update all

[Note : If yum update all show a error it means your rpm repositery is croupted ]




No comments:

Post a Comment