1.4. Installing Software

This section provides information to guide you through the basics of software installation on a Red Hat Enterprise Linux 7 system. It mentions the prerequisites that you need to fulfil to be able to install software in Section 1.4.1, “Prerequisites for Software Installation”, provides the basic information on software packaging and software repositories in Section 1.4.2, “Introduction to the System of Software Packaging and Software Repositories”, and references the ways to perform basic tasks related to software installation in Section 1.4.3, “Managing Basic Software-Installation Tasks with Subscription Manager and Yum”.

1.4.1. Prerequisites for Software Installation

The Red Hat Content Delivery Network subscription service provides a mechanism to handle Red Hat software inventory and enables you to install additional software or update already installed packages. You can start installing software once you have registered your system and attached a subscription, as described in Section 1.3, “The Basics of Registering the System and Managing Subscriptions”.

1.4.2. Introduction to the System of Software Packaging and Software Repositories

All software on a Red Hat Enterprise Linux system is divided into RPM packages, which are stored in particular repositories. When a system is subscribed to the Red Hat Content Delivery Network, a repository file is created in the /etc/yum.repos.d/ directory.
Use the yum utility to manage package operations:
  • Searching information about packages
  • Installing packages
  • Updating packages
  • Removing packages
  • Checking the list of currently available repositories
  • Adding or removing a repository
  • Enabling or disabling a repository
For information on basic tasks related to the installation of software, see Section 1.4.3, “Managing Basic Software-Installation Tasks with Subscription Manager and Yum”. For further information on managing software repositories, see Section 7.2, “Managing Software Repositories”. For detailed information on using the yum utility, see Chapter 9, Yum.

1.4.3. Managing Basic Software-Installation Tasks with Subscription Manager and Yum

The most basic software-installation tasks that you might need after the operating system has been installed include:
  • Listing all available repositories:
    ~]# subscription-manager repos --list
  • Listing all currently enabled repositories:
    ~]$ yum repolist
  • Enabling or disabling a repository:
    ~]# subscription-manager repos --enable repository
    ~]# subscription-manager repos --disable repository
  • Searching for packages matching a specific string:
    ~]$ yum search string
  • Installing a package:
    ~]# yum install package_name
  • Updating all packages and their dependencies:
    ~]# yum update
  • Updating a package:
    ~]# yum update package_name
  • Uninstalling a package and any packages that depend on it:
    ~]# yum remove package_name
  • Listing information on all installed and available packages:
    ~]$ yum list all
  • Listing information on all installed packages:
    ~]$ yum list installed