Hi friends, I am here to share an article – “how to configure the Yum server in Linux“.

It doesn’t matter which os are you using, if you want to install an application, you might require a package installation tool to use it. Different os uses different methods to install an application.

As we all know that some application involves the overhead of dependencies. No one wants to mess with the overhead involved in the installation, such as compatibility of application or program with hardware and OS, dependency checks and much more.

Today we are going to mess with the package installation in Redhat Linux-based systems. In Redhat based Linux systems, the rpm manager is the default package installation tool. Rpm is basically used to install & manage Rpm packages in Linux. Rpm stands for the Rpm package manager. But the main problem with rpm manager is that, if one have to install an application, which have many dependency checks then it have to manually install all dependencies .So it is a time-consuming task.

Today we are going to make it easy to install a program in Linux without any overhead of dependencies.We are going to use a very famous package management tool to install programs in RedHat based Linux systems.

Yum Server in Linux


Yum stands for yellowdog updater modified.It is an open source tool to manage package installation on RedHat based Linux systems. It is very popular installer  in Rhel, centos, fedora and other rpm based operating systems in Linux. It’s very easy to install a program with yum in Linux.

Did you know??

When we install a package in yum then yum will automatically fetch all dependency packages and install them at the same time. So that’s how it makes package installation very easy.


Today we are going to dedicate a complete article on yum installation and configuration.


Yum server configuration in Linux

It’s very easy to configure the yum server. We are going to post the best and easy way to configure yum in Linux. If you are in one who think that the yum server configuration in Linux is very complex then you will change your view after reading this tutorial. So just follow simple steps mentioned  on how to configure the yum server in Rhel.


Step by step guide


In this tutorial i am going to configure the yum server in Rhel5.4.


Step 1


First you need installation disk which has all .rpm packages. Don’t worry take a USB pen-drive and copy rhel5.4 iso file in your Pendrive. If you do not have rhel5.4 iso file then google it and download it.


Step 2


First of all turn on Rhel Os in your PC.


Step 3


Now insert Pendrive in your PC, rhel5.4 will detect it.Copy rhel5.4 iso file on the Desktop of rhel5.



Step 4


Next we have to mount the rhel5.4 iso file into a folder. I am going to mount the iso file in mnt folder

#mount -0 loop Rhel5.4.iso /mnt



Step 5


Now go to mnt folder

#cd    /mnt       (i am using / because mnt folder is inside the root)


Check files in the mnt folder by using below command==>
#ls     (this command is used to list files in folders)



So now you see there are many files inside mnt folder, here you found a folder named Server. This Server folder has all the .rpm packages required for package installation in Redhat based Linux. we have to copy this Server folder to the Desktop of the root.


#cp -rv Server/ /root/Desktop
here cp==> copy
rv ==>recursive forcefully


yum in linux


Step 6


Go to the configuration file of yum using below command

#cd /etc/yum.repos.d

yum server


Step 7


Now we have to create a file with repo extension such as I am going to create a.repo file ==>

#vim a.repo


yum server rhel5


Explanation of above file==>

[a] ==> it is just the name of repo file, yum will fetch all packages from ‘a’ repository

baseurl=file:///root/Desktop/Server ==> it is the path to the server folder

gpgcheck = 0 ==> it means it will ignore key checking, if we use 1 in place of 0 it will ask for key checking.

Step 8


Next we will install any package using yum, for example I am going to install telnet.

#yum install telnet*


#yum install -y telnet*

here y==> installation  will not ask for yes/no check
* ==>it will fetch all dependencies required for telnet package.


yum in linux rhel4


How to remove a package using yum?


To remove a package using yum package management tool, have an eye on this command ==>

#yum remove telnet



This command will remove telnet from your rhel5.
So friends, that’s how we can configure yum server for package installation in rhel5. As you see its very easy to configure yum package management tool .


Some important yum commands


These are some important commands used under yum package management tool==>

#yum clean all (to clean temporary installed package)
#yum list (to list files)
#yum list httpd
#yum info httpd (info related to httpd package)
#yum remove httpd (to remove httpd pacakge)
#yum whatprovides httpd
#yum provides telnet (detailed info about a package)
#yum shell ( enter into the yum shell)
#yum deplist php (for dependency check in a package)
#yum repolist


Related :

 Telnet server configuration

 Complete tutorial on SSH server configuration.

 configure Postfix Server in Linux.


How to configure remote yum server??


If there are 100 PC’s connected in a network and you have to configure the yum server on all PC’s. Now how will you do it & how much time did it take?
If we manually configure yum in each computer then it will take a massive amount of time. It will become a time-consuming task. So in complex networks remote yum server concept comes in action.


What is remote yum server concept?


According to remote yum server concept, we have to configure the yum server on only one system. This system will give yum service to all other PC’s in the network. It means all other PC in which yum is not configured are client PC and our yum configured system is the server PC. We should use FTP to offer yum service to all connected PC’s. So let’s get started==>


Remote yum server configuration on Server PC==>


Step 1


First of all we have to install ftp service on server pc, so go to Server folder and use command

#rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm



Above will install ftp service on server PC.


Step 2


Now restart the ftp service.



Step 3


As we learn in YUM server configuration, we have copy the Server folder to the Desktop of the root, but in remote yum server we have to copy the server folder to /var/ftp folder.

#cp -rv Server/ /var/ftp


I had copied the Server folder to ftp folder to offer yum service to all client PC’s using ftp service.


Step 4


Next go to yum configuration file.

#vim /etc/yum.repos.d


Step 5


Now create a.repo file using vim editor


#vim a.repo


baseurl=ftp://ip-address of server pc/Server

gpgcheck =0


To save the file in vim editor just use esc :wq (press esc then press colon then type wq and enter)


Step 6


Check yum server is working or not by installing a package==>

#yum install telnet*


so we have successfully configured remote yum service on Server PC


Yum remote configuration on client pc


We don’t have to configure yum server completely on client PC, we have to just create an a.repo file. We have to write same lines in the a.repo file that we had used in our server PC.


Step 1>  Go to yum server configuration file and create a.repo file
#vim /etc/yum.repos.d/a.repo




baseurl=ftp://ip-address of Server pc/Server

gpgcheck =0



Step 2>  Check yum is working or not by installing a package

#yum install telnet*


We do not have to copy rhel5.4 iso to desktop of client pc and then to /var/ftp, we have to just create a.repo file in our client pc.So that’s how our server pc will give yum server remotely to all other client pc’s.




So today in the article we have learned how to configure the yum server & yum remote server in rhel5.4. It’s easy to install and configure  yum server in rhel5. If you have any issues or problems related to this article, put your comment in the comment section and don’t forget to share this article on social networking sites.