Configure Yum Server on RHEL/CENTOS

By | April 29, 2019

This blog is going to be a short Introduction to the YUM Package manager in the linux which is very widely used in the RHEL/Centos environment. Yum Stands for yellowdog updater modifier. It’s main advantages over the rpm is that, it resolves package dependencies. 

Lets see how we can Configure yum server with its basic commands usage. In this tutorials we are considering that you must have the virtual environment setup and installed linux server using an ISI Image.

Here I have used the RHEL6 ISO Image though you can use the RHEL7/Centos7 ISO Image (OS) also and also use http instead of using ftp. Here we will be using ftp protocol for fetching the package from the Yum Server

 Yum Server configuration

Install vsftpd package, if not installed 
# rpm -qa vsftpd
# rpm -ivh vsftpd –> after mounting the cd first or ISO image
# mkdir /var/ftp/pub/rhel6/
# cp -rv /media/RHEL_6.0\i386\Disk\1/* /var/ftp/pub/rhel6/
# cd /var/ftp/pub/rhel6/
# ls

# vim /etc/yum.repos.d/server.repo
[server]
name=server repo
baseurl=file:///var/ftp/pub/rhel6
enabled=1
gpgcheck=0
:wq
# service vsftpd restart
or
# /etc/init.d/vsftpd restart
# yum clean all
# yum repolist
# yum list

Yum Client Configuration
# rpm -ivh vsftpd
# vim /etc/yum.repos.d/client.repo
[client]
name=client yum server
baseurl=ftp://yum_server_ip/pub/rhel6
enabled=1
gpgcheck=0

:wq
# service vsftpd restart
# yum clean all
# Yum repolist
# yum list

Note: If its not working, then check the firewall/iptables and disable it. Also make sure SELinux is disabled

# service iptables stop
# vim /etc/selinux/configuration
mode:disabled
:wq

Working with yum command

# yum list , # yum list all , # yum list | more –> to list available packages in the repository
# yum list installed –> to see all the installed packages
# yum list installed vsftpd –> see perticular package is installed or not
# yum install finger* -y –> to install package
# yum remove finger -y > to remove package
# yum update -y –> to update
# yum update httpd -y –> to update perticular package
# yum localinstall <package_name> -y –> to install package from pendrive or some external storage
# yum info <package_name> –> to see info about the package
# yum grouplist –> to list package groups
# yum groupinstall “Basic Web Server” -y –> to install group of packages
# yum groupremove “Basic Web Server” -y –> to remove group of packages

One thought on “Configure Yum Server on RHEL/CENTOS

Leave a Reply

Your email address will not be published. Required fields are marked *