What is a package in Linux?

A package is a complete archive of files containing the data about the applications. The files contain the information like version, date of release and the coded scripts to install a particular application

The extension of a package in all Linux flavors is .rpm

.rpm means Redhat Package Manager.

These packages are similar to the .exe files in windows.

 

What are the package parameters in Linux?

The packages are located at on the OS dump the path of the directory that contains the .rpm packages  is /media/RHEL_6.4 x86_64 Disc 1/Packages.

On that particular path, the entire dump of packages located.

For example, I have a package called vsftpd for configuring the FTP server.

 

package-mgmt

 

What is the Standalone installation of packages?

In this mode, we can install the packages through any removable media and dump installs the package.

The another mode is Network installation the packages are going to be installed from the networks like NFS and FTP

To know about the network based installation click here.

 

How to install the packages on a standalone machine?

Set the path to the local media as follows /media/RHEL_6.4 x86_64 Disc 1/Packages.

The syntax to install the package is as follows

 

Syntax:

# rpm –option pkg-name

 

Options:

                                 i               -- Install

                                 v             -- Verbose 

                                 h             -- Installation process display in hashes symbol

                                 f              -- install the pkg with forcefully

                                 a              -- install the pkg along with dependencies

                                 q             --query about the package

 

Before going to install the package mount the cd dump to the /mnt directory

[root@sys2 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

 

Go to the packages directory

[root@sys2 /]# cd /mnt/Packages/
[root@sys2 Packages]# pwd
/mnt/Packages

 

To install the package the command is as follows. I am installing the ftp package

[root@sys2 Packages]# rpm -ivh vsftpd-2.2.2-11.el6.x86_64.rpm warning: vsftpd-2.2.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature,
key ID                      fd431d51: NOKEY
Preparing...              ########################################### [100%]
   1:vsftpd                 ########################################### [100%]

 

To verify the package is installed properly or not follow the process below

[root@sys2 Packages]# rpm -qa vsftpd
vsftpd-2.2.2-11.el6.x86_64

 

How to update the package in Linux using rpm command?

The command is similar to installation command the only difference is providing –U it stands for updating.

I am going to update the installed package vsftpd.

[root@sys2 Packages]# rpm -Uvh vsftpd-2.2.2-11.el6.x86_64.rpm  --force warning: vsftpd-2.2.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature,
key ID                      fd431d51: NOKEY
Preparing...              ########################################### [100%]
   1:vsftpd                 ########################################### [100%]

 

How to remove the package using rpm command?

Using –e option to the rpm command we can delete the package

The command is as follows

[root@sys2 Packages]# rpm -e vsftpd-2.2.2-11.el6.x86_64

 

Topics Summary