Redhat 4 Package Manager Command Line

Posted on by
  1. Red Hat 4 Package Manager Command Line Linux
  2. Linux Redhat Commands Pdf
  3. Redhat Commands List Pdf

How do I use apk command line utility for the package management on Apline Linux server running in cloud or a Linux container? R0 - PHP FastCGI Process Manager.

Although most of the time, we install RPM packages using command via the official or unofficial repository in Linux. However, it is not the only way, just like Windows on Linux too, we can directly download and install software packages using Redhat supported open-source tool called RPM Package Manager.
Today, here we will see how to use the RPM command to install RPM packages of CentOS or RHEL. Plus also we use YUM and DNF to install RPM packages. As CentOS 8 and RHEL 8 now support dnf too.

Managing packages in RHEL using Yum. To install software using the Yum package manager you should be either logged in as root or as a user with sudo access. If, for example, you are ‘admin2’ and have sudo access, you would install ‘somepackage-0.123-4.i386.rpm’ by using the following command. Red Hat Subscription Manager is a local service which tracks installed products and subscriptions on a local system to help manage subscription assignments. It communicates with the backend subscription service (the Customer Portal or an on-premise server such as Subscription Asset Manager) and works with content management tools such as yum. YUM (Yellowdog Updater Modified) is an open source command-line as well as graphical based package management tool for RPM (RedHat Package Manager) based Linux systems. It allows users and system administrator to easily install, update, remove or search software packages on a systems. Explaining RPM Command. In this session we will focus on some useful RPM command with Examles. RPM Stands for Redhat Package Manager which is responsible for Installing, Verifying, Upgrading, Querying and Uninstalling packages.

First, log in as root or a user with sudo rights on your Linux server. You can use the command: su

Now, download the software package you want to install. For example, here we are downloading the RPM package of PHP software from its official website. Let’s say the name of it is php-5.4.16-46.el7.x86_64.rpm

RPM Command to install packages

After downloading the RPM package, first, we show the RPM command to install it on CentOS or Redhat 8/7/6.

The command is:

rpm -i packagename.rpm

How to use it:

For rpm force install just use the -f flag

So, in this way, we can simply use RPM command to install any rpm packages, however, it not resolve the dependencies of any packages require and gives error most of the time. If you have some packages that need some extra packages while installing it, use the YUM command shown in this article.

The output for the above command:

RPM uninstall command

If you want to use the same RPM command to uninstall or remove some installed package or software then it will be like this:

Structure of the command:

rpm -e package_name

Example to use it:

The difference is the flag used with the RPM command i.e -e for uninstalling whilst if you use -i, the same command will use to install.

Use RPM to list all installed packages

For information to see what are the packages currently installed on your system you can use this command:

Furthermore, to see the total number of packages installed on your system in figures we can use a command:

Yum command to install rpm with dependencies

Yes, we can use YUM to install RPM packages, the benefit of this command as told above, it has the capability to download & install the dependencies a software needs while installing it on CentOS 8/7/6 or RHEL 8/7/6 based Linux systems…

The command structure is:

yum install package-name

Example: How to use it

The output of above command:

Yum package uninstall command

If you want to use the Yum to remove any installed package then instead of using install use remove in the command. In this way:

yum remove package-name

example:

Yum command to list all installed RPM packges

Red

If you are comfortable with YUM, you can also use it to see the list of a total number of RPM packages installed on your system, currently.

Moreover, to see the total count of the installed software or packages use:

Use DNF to install RPM packages

Redhat command list

Just like a yum package manager, dnf can be used to install RPM software along with the dependencies that particular package requires. It works the same as Yum even the syntax will also be the same, the only difference will be the command starts with dnf instead of yum.

Command structure:

dnf install rpm-package-name

Example: How to use it

DNF uninstall command

Just like the YUM, to remove packages with DNF we also use remove instead of install in the syntax.

dnf remove package-name

example:

Bonus Tip:

Yumdownloader

Do you know? We can directly download the RPM package of any software from the official or unofficial repository available on the Linux system using yum downloader command.

Just type the package name you want to download, for example, we want to download the PHP package available in the official repo of CentOS 7, thus the command will be like this:

Simple isn’t?

Output of the above commnad:

Other Articles :

Red Hat Enterprise Linux, like Fedora and CentOS, uses the RPM format to manage package (software) installation. Modern versions of Redhat-based operating systems benefit from the Yum package management tool. Yum, the “Yellowdog Updater, Modified”, checks and installs package dependencies automatically if available. If you are using RHEL version 4, you will only be able to use yum if you have installed it, it is not installed by default. In RHEL 4 and older, you’ll use up2date. For more details on up2date please visit the web page accessed using the URL as follows:

First, we’ll get some of the common terminology taken care of, then we’ll discuss package management using Yum, and finally, package management using RPM.

Packages

Packages in this case refers to software in the form of RPM bundles. Packages contain compressed archives with files, documentation, management scripts, and dependency information.

Repositories

Repositories refer to a location containing software packages. Yum uses repository locations to automatically install the correct package or series of packages.

Dependencies

Dependencies refer to libraries or other pieces of software necessary for any given software to run. For example, you want to install somepackage-0.123-4.i386.rpm. In order for this software to install, any software that it needs to run will need to be installed either automatically through Yum or manually using RPMs.

Package Naming Conventions

Proper RPM packages adhere to a standard naming convention. The name may seem a bit long, but knowing how to identify a package based on it’s naming convention helps considerably when trying to find the correct software. Packages are usually referred to using either

package name (example, somepackage)

package name with version and relase (example, somepackage-0.123-4

package name with CPU architecture (example, somepackage.i386)

Yum lists packages as package-name.arch. We generally only support the i386 and x86_64 architectures at Superb, i386 being suitable for all Intel-compatible processors, and x86_64 compatible with any 64-bit capable AMD or Intel processor. You may also see some packages listed as i586 or i686 architecture, these refer to packages compiled with additional support for processor-sepcific CPU extensions.

Dmg of a small bastard sword 3.5 x. Managing packages in RHEL using Yum

To install software using the Yum package manager you should be either logged in as root or as a user with sudo access. If, for example, you are ‘admin2’ and have sudo access, you would install ‘somepackage-0.123-4.i386.rpm’ by using the following command:


sudo yum install somepackage

if you were logged in as root, you the ‘sudo’ command is not necessary. Notice it isn’t necessary to use the full package name. Yum checks your system architecture and it’s repository list to determine the best package to install. If you already have a version of somepackage installed but would like to update it, you would use


To update all software on the server, you would type

Red Hat 4 Package Manager Command Line Linux

sudo yum update

You may also allow RHEL to check for system updates daily. To set this automated feature, you would type

sudo chkconfig –level 345 yum on; service yum start

Conversely, you may remove software from RHEL using yum


sudo yum remove somepackage

Generally speaking, these will be the most common commands you would need to use to manage packages in RHEL. When you get a server with RHEL installed, the default repositories are already added. In the event that you must install an RPM package outside of the yum package manager, here are a few common commands to employ. Let’s say you need to install somepackage-0.123-4.i386.rpm but the package isn’t available through any of your Yum repositories. You’ve found the package and the CPU architecture matches, you’ve saved the rpm file to your server, and you would like to install it. Navigate to the folder with the rpm package and type

sudo rpm -ivh somepackage-0.123-4.i386.rpm

if you are logged in as root you may omit the ‘sudo’ command. To break down what’s being done, the -ivh flag after rpm tells RPM to install, verbosely, with hashmarks. This means it will install the software, print to screen any messages, and will show a progress bar using the # symbol. If you had, for example, somepackage-0.111-3.i386.rpm installed already and would like to update it, you would use


Linux Redhat Commands Pdf

sudo rpm -Uvh somepackage-0.123-4.i386.rpm

Here, the -Uvh tells RPM to update, verbosely, and with hashmarks. If you have the package installed and you would like to remove it, you would use

sudo -e somepackage-0.123-4.i386.rpm

You cannot remove a package that meets another installed package’s dependencies. If you attempt to remove a package and are unsuccessful due to this, you may type

rpm -q –whatrequires somepackage-0.123-4.i386.rpm

Redhat Commands List Pdf

There are quite a few additional aspects to both Yum and RPM package management, but these are the most common. If you require more information on Yum or RPM, please visit the web pages accessed at the web addresses as follows: