Yum server Configuration How to install Configure Yum server in RHEL 5 Linux

Yum server Configuration
Step 1: Copy the package Copy all packages from all cd's to any location #mount /dev/cdrom /mnt
#cp vr /mnt/Server /var/ftp/pub
#eject
Step 2: install the crearepo rpm file
install createrepo rpm
#rpm ivh /var/ftp/pub/Server/createrepo0.4.42.noarch.rpm
Step 3:
create yum database
#createrepo g /var/ftp/pub/Server/repodata/compsrhel5server
core.xml /var/ftp/pub/Server/
#rm rf /var/ftp/pub/Server/.olddata
#createrepo g /var/ftp/pub/Server/repodata/compsrhel5server
core.xml /var/ftp/pub/Server/
Step 4:
create yum repository file in /etc/yum.repos.d/ directory
#vim /etc/yum.repos.d/sample.repo
[Server]
name=server packages
baseurl=file:///var/ftp/pub/Server
gpgcheck=0
Step 5:
clean yum cache and list all packages
#yum clean all
#yum list all
Remote package install configuration in rhel5
Client: install the Yum server by through Remote package
Step 1:
create yum repository file
#vim /etc/yum.repos.d/sample.repo
[Server]
name=server packages
baseurl=ftp://192.168.0.10/pub/Server
gpgcheck=0
Step 2:
Clean yum cache and list all packages
#yum clean all
#yum list all
Remote package install configuration Complete successfully
Install, Remove and List Packages Using Yum in rhel5
List: List installed packages
#yum list installed
List available i.e not installed packages
#yum list available
List installed and available packages
#yum list all
Group List:
#yum grouplist all
#yum grouplist available
#yum grouplist installed
Install single package in rhel5
#yum install vimX11
Group Install:
#yum groupinstall “Web Server”
Remove:
remove single package
#yum remove vimX11
Group Remove:
#yum groupremove “Web Server”
Query Packages
Package usage:
#yum info packagename
Searching Files:
#yum whatprovides filename
Query Packages in rhel5 install configuration
Package usage:
#yum info packagename
Searching Files:
#yum whatprovides filename

Related post