Installing CentOS 8 content

The following sections describe how to install content in CentOS 8.

Installing a package

This section describes how to install packages.

Procedure
  • Install the package:

    # yum install package
    • If the package is not provided by any module stream, this procedure is identical to the procedure used on previous versions of CentOS.

    • If the package is provided by an module stream that is enabled, the package is installed without any further manipulation.

    • If the package is provided by a module stream marked as default, the yum tool automatically transparently enables that module stream before installing this package.

    • If the package is provided by a module stream that is not active (neither of the above cases), it is not recognized until you manually enable the respective module stream.

Selecting a stream before installation of packages

Default module streams ensure that users can install packages without caring about the modular features. When the user wants packages with version from a non-default stream, that stream must be enabled before packages provided by it can be installed.

Prerequisites
Procedure
  • Enable the module stream:

    # yum module enable module-name:stream

    Replace module-name and stream with names of the module and stream.

    yum asks for confirmation and the stream is enabled and active. If another stream of the module was previously active (default or enabled), it is no longer active.

Installing a module stream

This section describes using a module stream to install the recommended set of packages from that module.

Prerequisites
Procedure
  • Install a profile of the module stream:

    # yum install @module-name:stream/profile

    This enables the stream and installs the recommended set of packages for a given stream (version) and profile (purpose) of the module.

    Omit /profile to use the default profile. If no profile is set as default, this step fails without a specified profile and you must specify it.

    Additionally, omit :stream to use the active stream. If there is no active stream for the module, you must specify a stream.

Example: Installing a non-default stream of an application

This example shows how to install an application from a non-default stream (version).

More specifically, this example shows how to install the PostgreSQL server (package postgresql-server) in version 9.6, while the default stream provides version 10.

Procedure
  1. List modules that provide the postgresql-server package to see what streams are available:

    $ yum module list postgresql
    Name        Stream  Profiles             Summary
    postgresql  10 [d]  client, default [d]  PostgreSQL server and client module
    postgresql  9.6     client, default [d]  PostgreSQL server and client module
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

    The output shows that the postgresql module is available with streams 10 and 9.6. The default stream is 10.

  2. Install the packages provided by the postgresql module in stream 9.6:

    # yum install @postgresql:9.6
    Dependencies resolved.
    =====================================================================
     Package           Version                           Repository Size
    =====================================================================
    Installing group/module packages:
     postgresql-server 9.6.10-1.module+el8+2470+d1bafa0e appstream  5.0 M
    Installing dependencies:
     libpq             10.5-1.el8                        appstream  188 k
     postgresql        9.6.10-1.module+el8+2470+d1bafa0e appstream  1.4 M
    Installing module profiles:
     postgresql/server
    Enabling module streams:
     postgresql                 9.6
    
    Transaction Summary
    =====================================================================
    Install  3 Packages
    
    Total download size: 6.6 M
    Installed size: 27 M
    Is this ok [y/N]: y
    (...)
    Complete!

    Because the installation profile was not specified, the default profile server was used.

  3. Verify the installed version of PostgreSQL:

    $ postgres --version
    postgres (PostgreSQL) 9.6.10

Running installed content

Usually, after you install content from CentOS 8 repositories, new commands will be enabled. If the commands originated from a RPM package or RPM packages enabled by a module the experience of using the command should be no different. To run the new commands use them directly:

$ command

Commands for installing CentOS 8 content

This section lists commonly used commands for installing CentOS 8 content.

Command list
Install a package
# yum install package

If the package is provided by a module stream, yum resolves the required module stream, and enables it automatically while installing this package. This happens recursively for all package dependencies, too. If more module streams satisfy the requirement, the default ones are used.

Enable a module using its default stream
# yum module enable module-name

Enable the module when you wish to make the packages available to the system but do not, at this time, wish to install any of them.

Some modules may not define default streams. In such case, you must explicitly specify the stream.

Enable a module using a specific stream
# yum module enable module-name:stream

If the module defines a default stream, you can omit the stream and colon.

Install a module using the default stream and profiles
# yum install @module-name

Alternatively:

# yum module install module-name
Some modules do not define default streams.
Install a module using a specific stream and default profiles
# yum install @module-name:stream

Alternatively:

# yum module install module-name:stream
Install a module using a specific stream and profile
# yum install @module-name:stream/profile

Alternatively:

# yum module install module-name:stream/profile

Additional resources

Online resources
  • For more information about the traditional software installation methods, see the chapter Installing software with yum in the Configuring basic system settings in RHEL 8 document.

Installed resources
  • For details of various yum tool commands, see the yum(8) manual page:

    $ man yum