In this article, we’ll explain what is Linux software yum and rpm.
What is Linux Software YUM and RPM
- It is called a Package
- It is a file with extension “.rpm”
- Naming convention of the file is as follows
- <name> – <version> – <release>.<architecture>.rpm
Eg: ftp-0.17-51.1.rl6.i686.rpm [ads1] 
- Package name: ftp
- Version: 0.17
- Release: 51.1.el6 (el5,rhl9,fc4,suse100)
Where to get rpm from?
- net
- pbone.net
What is rpm database in Linux ?
- It is a list of files stored in /var/lib/rpm
- It contains information of all packages, groups installed on the system [ads2]
What is a yum repository ?
- It is a directory on any server which contains all rpm packages and its dependency information
- Yum command downloads the packages from this server and installed on local machine
- Location of this server is stored in a special file under /etc/yum.repos.d/
What is a yum cache?
- It is a directory (on local) where information obtained from the yum repository is stored for better performance
- The default locations of this directory is /var/cache/yum
- It can be changed by modifying /etc/yum.conf [ads3]
What happens when we install a package ?
- A list of dependent packages is obtained from the yum repository
- A check is made to find out if all dependent packages are installed or not
- Dependent packages are installed first
- Required packages are installed later
- What if any packages are installed, multiple files are extracted from the packages and copied to various directories with proper file permissions and ownership.
- The rpm database under /var/lib/rpm is updated with the new package information.
Rpm commands (Installing from rpm file)
Install [-ivh] Uninstall [-ev] Upgrade [-Uvh] Query [-q]
| Commands | Help Notes |
| rpm –q –a | Query all installed packages on system |
| rpm –qa | grep ftp | Find if ftp is installed or not |
| rpm –q ftp | |
| rpm –qi nmap | Complete info about nmap and packages |
| rpm –qa |more | |
| rpm –ql nmap | List all files installed by nmap packages |
[box type=”note” align=”” class=”” width=””]When U Install any Packages on the system it contains[/box]
- File Script
- Documentation
- Configuration [ads4]
| Commands | Help Notes |
| rpm –qs nmap | List the scripts file installed by nmap packages |
| rpm –qd nmap | List all doc of packages |
| rpm –qc nmap | List config files of packages |
| rpm –q –requires nmap | List Dependencies |
| rpm –q –last nmap | Know when was lastly installed |
| rpm –qf /usr/share/ncat | To check which package as installed this file and also it displays the package name |
| rpm –q –i –p <package.rpm> | Find info about package from the rpm file not from the rpm database |
| rpm –ivh <package.rpm> | Install the package |
This is the end of tutorial, we have explained what is Linux software yum and rpm. [ads5]
[divider style=”normal” top=”20″ bottom=”20″]
Read Other Articles
How to create YUM Repository from ISO or Online
How to execute script or command on reboot or startup in Linux
This does interest me