Installation Linux Software Package through YUM Command
In previous tutorial we used rpm utility to install linux package which is a manual process and some times its difficult to install certain packages specially when it depends upon list of packages which are missing from system. In that situation you have to install all required packages.
In this tutrial now we are going to install packages over the internet through command YUM (Yellowdog Updater Modifier). This tool is very easy to use and identify dependencies automatically and install them. It allows system administrator to easily install, update, remove and search software packages on a system.
There are other ways to configure local yum repository (DVD , FTP etc) which we will discuss later in another tutorial
Syntax is yum install packagename
Install a Package using command yum install tigervnc-server (Package name you want to install please make sure you are connected with internet) as shown in below image;
Before it installs package it will ask your confirmation y(yes) N (no)
Press ‘y’ to install the package. If you want yum to install without prompt then type option ‘-y’.
Like yum install –y tigervnc-server.
As we did not specify switch -y with above command so we have to press y to install package
Installation complete!
If you believe that any package installed on system is old and needs update use below command
Syntax : yum update packagename
Lets say we want to update package tigervnc-server using command yum update.Below screenshot shows yum update process
As we just installed package in this tutorial over internet so at moment no update is available
If we don’t know the exact name of package we want to install then we use command
yum search keyword (keyword must contain part or full name of package) will search all the packages that matches the keyword and display it.
If you want to check the additional information any package use below command
yum info packagename
In our example we will know more about tigervnc
yum info tigervnc.
What if you want to remove package?
use command : yum remove packagename
Lets remove tigervnc-server package. Yum will prompt accept or decline phase press ‘y’ for uninstall/remove a package. If you do not want yum to ask permission to delete use switch ‘-y‘.
To know/view all available packages in yum database by using command yum list. In below image you can only see some packages there are so many packages in yum database. Do it yourself to check.
To list only the installed packages currently on system use below command
yum list installed.
We like to know which package a particular file belongs to execute command yum provides filename. Here I am using file msggrep file which is pattern matching on message catalog and this file related to gettext utility it is also describe the path as shown in below image;
In yum few packages are in a group form. Instead of search and install all the individually packages that belong to a specific task we can simply using command which will display all the group packages
command: yum grouplist
It is interesting command now we can install packages in a group by using command
yum groupinstall Packagename
(here I am using “web server” with inverted comas because of space)
Press ‘y’ to install or you can use with command ‘-y’ option.
Note: To update the group package use command yum groupupdate packagename. In this scenario I installed fresh and updated version so i do not need to update it.
To remove a group package we can use command yum groupremove “web server”.
Question:
Did you notice one point in groupinstall and groupremove package of web server? At the time of installation there were 9 files in that group but when we removed the group package just 5 file were erased. Can anyone answer why those 4 files are not removed?
Thanks