How to install Package in linux

Software installation in linux 

Installing, patching, and removing software packages on Linux machines is one of the common tasks every sysadmin has to do. In linux use software installation have two method  GUI or command line but in linux software installation use in command only is called as package manager. In linux two type of package manager yum or rpm.

1. Yellow Dog Updater, Modified (YUM)

YUM is the primary package management tool for installing, updating, removing, and managing software packages in Red Hat Enterprise Linux. Yum performs dependency resolution when installing, updating, and removing software packages. Yum can manage packages from installed repositories in the system or from .rpm packages.

The main configuration file for YUM is at /etc/yum.conf  and  all the repos are at  /etc/yum.repos.d.

# yum -[option] [command]

Installs the specified packages and update last -y automatically yes for install if not add then ask for yes installation

# yum install 
# yum -y install httpd
# yum update -y

Removes the specified packages

# yum remove [PACKAGE NAME]
# yum remove httpd

Searches package metadata for keywords

# yum search [PACKAGE NAME]
# yum search httpd

Lists description

# yum info [PACKAGE NAME]
# yum info httpd

Lists repositories

# yum repolist [PACKAGE NAME]
# yum repolist httpd

 

2. RPM Package Manager (RPM)

RPM is a popular package management tool in Red Hat Enterprise Linux-based distros. RPM you can install, uninstall, and query individual software packages. Still, it cannot manage dependency resolution like YUM.

In RPM package commonly-used modes

-i = Installs a package                                                                                                                                                                      -U = Upgrades a package                                                                                                                                                                -e = Erases a package                                                                                                                                                                      -V= Verifies a package                                                                                                                                                                      -q = Queries a package

# rpm -i   [PACKAGE-FILE] 
# rpm -U   [PACKAGE-FILE] 
# rpm -ivh [PACKAGE-FILE] 
# rpm -ivh httpd

 

Was this article helpful?

Related Articles