Registering RHEL 8 or CentOS Linux 8
This guide describes how to use SUSE Liberty Linux to update Red Hat Enterprise Linux 8 or CentOS Linux 8.
Copyright © 2022–2022 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see http://www.suse.com/company/legal/. All third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof.
1 Introduction #
SUSE Liberty Linux is a technology and support solution for mixed Linux environments. With a SUSE Liberty Linux subscription, you can register and receive updates for Red Hat Enterprise Linux, CentOS Linux, and SUSE Linux Enterprise Server. An optional High Availability extension is also available.
CentOS Stream is not supported.
To register Red Hat Enterprise Linux 8 or CentOS Linux 8, use SUSE's Repository Mirroring Tool (RMT). RMT is a proxy system for the SUSE Customer Center. The RMT server is registered with the SUSE Customer Center, and other systems in the network are registered with the RMT server and receive packages from it directly.
Registering RHEL or CentOS Linux with RMT involves the following steps:
Section 2, “Requirements”. Make sure you have everything required for the following procedures.
Section 3, “Configuring the RMT server”. This server must be installed on SUSE Linux Enterprise Server 15. You can skip this step if you already have an RMT server in your network.
Section 4, “Mirroring SUSE Liberty Linux repositories with RMT”. You can skip this step if SUSE Liberty Linux is already enabled and mirrored on your RMT server.
Section 5, “Registering RHEL or CentOS Linux with RMT”. RMT includes a setup script to automate the registration process.
Note: SUSE Liberty Linux and SUSE Linux Enterprise Server with Expanded Support
SUSE Liberty Linux now provides what used to be covered by the SUSE Linux Enterprise Server with Expanded Support subscription. Some components might still use the Expanded Support name during the transition period.
Related information #
2 Requirements #
You have a SUSE Liberty Linux subscription.
You have a SUSE Customer Center account.
The systems you want to register have been updated to the latest version of RHEL 8 or CentOS Linux 8.
SUSE Linux Enterprise Server (SLES) 15 is installed and running in the same network as the systems you want to register. You can use the SUSE Liberty Linux subscription to register the SLES server. To install the latest version of SLES 15, see the Installation Quick Start.
The SLES server has enough storage available for repository mirroring. Downloaded packages are stored in
/usr/share/rmt/public/repo
, which is a symbolic link to/var/lib/rmt/public/repo/
. The amount of storage required depends on the number of repositories that you mirror.We recommend at least 1.5 times the total size of all enabled repositories. For RHEL 8 or CentOS Linux 8, this means approximately 150 GB for the default repositories, and an additional 735 GB if you need the
src
anddebug
repositories. However, be aware that these repositories will grow over time.
3 Configuring the RMT server #
Use this procedure to configure the Repository Mirroring Tool (RMT) on SUSE Linux Enterprise Server 15.
Prerequisites #
SUSE Linux Enterprise Server 15 is installed and up to date.
You have a SUSE Customer Center account and organization credentials.
Procedure 1: Configuring the RMT server #
Install RMT on SUSE Linux Enterprise Server 15:
#
zypper in rmt-server
Start the
rmt
module in YaST:#
yast2 rmt
Enter your
, then select .To find your organization credentials, log in to the SUSE Customer Center, select your organization from , and click . Your organization's are in the top right corner.
Enter
for a new MariaDB database user, then select . The new user is created.If a password for the MariaDB root user is already set, enter the password when prompted, then select
.If no password is set for the MariaDB root user, enter and confirm a new password when prompted, then select
.Enter a
for the SSL certificates. The common name is usually the FQDN of the server.If the server has other domain names or IP addresses, enter these as
. Select to add new names. When all common names are entered, select .If prompted, enter and confirm a password for the CA private key, then select
.Activate the check box
, then select .YaST displays the
. Select .Review the
, then select to close YaST.
YaST enables and starts all RMT systemd
services and timers.
More information #
4 Mirroring SUSE Liberty Linux repositories with RMT #
Use this procedure to mirror the SUSE Liberty Linux repositories for Red Hat Enterprise Linux 8 and CentOS Linux 8.
Prerequisites #
The RMT server has enough storage available for repository mirroring.
Your organization credentials appear correctly in
/etc/rmt.conf
.You have a SUSE Liberty Linux subscription activated in the SUSE Customer Center.
Procedure 2: Mirroring SUSE Liberty Linux repositories with RMT #
On the RMT server, update the available product and repository metadata:
#
rmt-cli sync
Synchronization is also performed automatically by
rmt-server-sync.timer
. You can check the status and the next scheduled sync time with the following command:#
systemctl status rmt-server-sync.timer
Enable SUSE Liberty Linux using the product ID
1921
:#
rmt-cli product enable 1921
Found product by target 1921: SUSE Linux Enterprise Server with Expanded Support 8 x86_64. Enabling SUSE Linux Enterprise Server with Expanded Support 8 x86_64: SUSE Linux Enterprise Server with Expanded Support 8 x86_64: Enabled repository RES-8-Updates. Enabled repository RES-AS-8-Updates. Enabled repository RES-CB-8-Updates.This enables all of the default repositories associated with the product.
If your subscription includes the High Availability extension, enable the extension using the product ID
1922
:#
rmt-cli product enable 1922
Found product by target 1922: SUSE Linux Enterprise High Availability Extension with Expanded Support 8 x86_64. Enabling SUSE Linux Enterprise High Availability Extension with Expanded Support 8 x86_64: SUSE Linux Enterprise High Availability Extension with Expanded Support 8 x86_64: Enabled repository RES-8-HA-Updates.To check whether the High Availability extension is available, run this command:
rmt-cli products list --all --name="Expanded Support" --version=8
If you also need the
Source
orDebug
repositories, find and enable them with the following commands:#
rmt-cli repo list --all | grep RES-
#
rmt-cli repo enable REPO_ID
Start package mirroring for the enabled repositories:
#
rmt-cli mirror
Packages are downloaded to the RMT server once per day by
rmt-server-mirror.timer
. You can check the status and the next scheduled download time with the following command:#
systemctl status rmt-server-mirror.timer
More information #
5 Registering RHEL or CentOS Linux with RMT #
Use this procedure to register Red Hat Enterprise Linux 8 or CentOS Linux 8 with the RMT server.
CentOS Stream is not supported.
Prerequisites #
Section 4, “Mirroring SUSE Liberty Linux repositories with RMT”
The system you want to register can access the RMT server.
The system you want to register is running the latest version of RHEL 8 or CentOS Linux 8.
You have a SUSE Liberty Linux subscription activated in the SUSE Customer Center.
You have removed the system from any Red Hat subscription services it was registered to.
Procedure 3: Registering RHEL or CentOS Linux with RMT #
Disable the RHEL or CentOS repositories in
/etc/yum.repos.d
by settingenabled=0
in each.repo
file.Download the
rmt-client-setup-res
script:#
curl http://RMT_SERVER/tools/rmt-client-setup-res --output rmt-client-setup-res
Run the
rmt-client-setup-res
script with the URL of the RMT server as a parameter:#
sh rmt-client-setup-res https://RMT_SERVER
The script performs the following tasks:
Installs
SUSEConnect
and its dependencies.Downloads and runs the
rmt-client-setup
script, which does the following:Downloads all keys from
http://RMT_SERVER/repo/keys
.Imports the keys with
gpg --import
andrpm --import
.Downloads the CA certificate from
https://RMT_SERVER/rmt.crt
.Imports the CA certificate to the trust store.
Uses
SUSEConnect
to register the system with the RMT server. Registering the system usingSUSEConnect
adds and enables all default repositories.
If the script works, you will see
Successfully registered system
. If the script fails, see Section 6, “Troubleshooting” for potential solutions.Verify the installed product:
#
SUSEConnect --status-text
You should see the following output:
Installed Products: ------------------------------------------ SLES Expanded Support platform release file (RES/8/x86_64) Registered ------------------------------------------
Verify the available repositories:
#
dnf repolist
You should see
RES-8-Updates
,RES-AS-8-Updates
, andRES-CB-8-Updates
.If your subscription includes the High Availability extension, activate it with the following command:
#
SUSEConnect –p RES-HA/8/x86_64
To check whether the extension is available, run the
SUSEConnect --list-extensions
command.Run the update command to make sure there are no errors:
#
dnf update
You can now update your system from repositories provided by SUSE Liberty Linux.
6 Troubleshooting #
nginx.service
is inactive after installing the rmt-server packageContinue the procedure to configure RMT in YaST. This often resolves the issue. If that fails, Apache might be installed on your server, and must be disabled. Apache conflicts with NGINX because both web servers listen on port 80.
- SUSE Liberty Linux doesn't appear in
rmt-cli products list
afterrmt-cli sync
Check your network. If the network is down, the sync command fails without showing an error.
- Mirroring completes with errors
If some packages could not be downloaded due to timeouts, rerun the
rmt-cli mirror
command until all packages are downloaded.- Setup script cannot access the SUSE Liberty Linux repository
The
repodata
directory on the RMT server will not be available until all of the packages for that repository are downloaded. If some packages could not be downloaded to the RMT server due to timeouts during the first mirroring, rerun thermt-cli mirror
command until all packages are downloaded.- Setup script cannot remove the protected package redhat-release
On RHEL, the redhat-release package is protected as a dependency of the setup package. If necessary, you can use the following command to remove redhat-release without checking for dependencies:
#
rpm -e redhat-release --nodeps
- Setup script cannot install sles_es-release because of package conflicts
If sles_es-release conflicts with existing packages, try the following workaround:
Remove the
redhat-release
directory:#
rm -r /usr/share/redhat-release
On CentOS, this removes the symbolic link between
redhat-release
andcentos-release
.Edit the
rmt-client-setup-res
script to add--allowerasing
to the following line:$DNF install ${AUTOACCEPT} SUSEConnect sles_es-release librepo-1.9.2 --allowerasing
- Setup script cannot install SUSEConnect because of package dependencies
SUSE Liberty Linux only supports the latest version of RHEL or CentOS Linux. If your system is running the latest version and SUSEConnect still has package dependency issues, try the following workaround:
Edit the
rmt-client-setup-res
script to add--skip-broken
to the following line:$DNF install ${AUTOACCEPT} SUSEConnect sles_es-release librepo-1.9.2 --skip-broken
Run the script and accept any proposed package changes. SUSEConnect will be skipped.
Run the script a second time. The package changes from the first attempt can sometimes resolve the package dependency issues, allowing the second attempt to successfully install SUSEConnect.