How to Manually Install Packages on a RHEL/CentOS Server

On Red Hat Enterprise Linux and Red Hat-based servers (ex: CentOS), the best way to install packages is to use YUM. By entering the yum command, you can download and install software from the distribution and third-party repositories without any difficulty. On occasion, however, you might need to install an rpm package that is not from your distribution’s repository or from the version of the distribution that you are currently running. In those instances, you will need to manually install the package.

You can use the command “rpm” to install and set up rpm packages on distributions such as RHEL, CentOS, and Fedora. To install a package stored on your system, simply type from the command line:

# rpm -Uvh package-name.rpm

Replace “package-name.rpm” with the actual name of your package. The “-U” option tells rpm to upgrade if an older version of the package exists on the system. Otherwise, it will install. The “v” option tells rpm to print verbose information, which typically consists of an installation progress message. The “-h” option prints hash marks showing the progress, much like a progress bar in a graphical interface.

The output will look something like this:

Preparing… ########################################### [100%]

1:package-name ########################################### [100%]

Once the package is installed on your system, you can manage and configure it just as you normally would. For more information about using rpm, see the online documentation.

 











Comments: