Date: 6/4/2018
Package management
Linux System Administration

Installing and removing RedHat packages with YUM

RPM Package naming convention:
(package-name)-(source version)-(package release).(architecture).rpm
For example,
Package name is nano. The source version is 2.3.1. The package release is 10.el7 (Release 10 for RedHat Enterprise Linux 7). Architecture is x86_64.

Start your CentOS7 VM, login to its console via command virsh console CentOS7, and clean the yum cache:
yum clean all
Install package netpbm on it:
yum install netpbm
Reinstall package netpbm:
yum reinstall netpbm

Install package acpid
yum install acpid

Install YUM utils package:
yum install yum-utils
Now you can run yumdownloader to download packages without installation, for example:
yumdownloader make
ls -l make*
Check available updates for installed packages:
yum check-update
Update package tzdata.noarch
yum update tzdata.noarch
Updating all the installed packages:
yum update

To remove an installed package:
yum remove netpbm
The same can be accomplished with:
yum erase netpbm

The YUM cache location and configuration are stored in file /etc/yum.conf
The YUM repositores are defined in directory /etc/yum.repos.d/*.repo

Take me to the Course Website