Registering RHEL 7 or CentOS Linux 7
This guide describes how to use SUSE Liberty Linux to update Red Hat Enterprise Linux 7 or CentOS Linux 7.
Copyright © 2022–2023 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 RHEL 7 or CentOS Linux 7, use SUSE's Subscription Management Tool (SMT) for SUSE Linux Enterprise 12. SMT is a proxy system for the SUSE Customer Center. The SMT server is registered with the SUSE Customer Center, and other systems in the network are registered with the SMT server and receive packages from it directly.
The Repository Mirroring Tool (RMT) for SUSE Linux Enterprise 15 does not support RHEL/CentOS 7 registration.
Registering RHEL or CentOS Linux with SMT involves the following steps:
Section 2, “Requirements”. Make sure you have everything required for the following procedures.
Section 3, “Configuring the SMT server”. This server must be installed on SUSE Linux Enterprise Server 12. You can skip this step if you already have an SMT server in your network.
Section 4, “Mirroring SUSE Liberty Linux repositories with SMT”. You can skip this step if SUSE Liberty Linux is already enabled and mirrored on your SMT server.
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.
2 Requirements #
You have a SUSE Liberty Linux subscription.
You have a SUSE Customer Center account.
The systems you want to register are up to date. SUSE Liberty Linux only supports the latest minor release of each RHEL or CentOS Linux version.
SUSE Linux Enterprise Server (SLES) 12 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 SLES. To install SLES 12, see Installation Quick Start.
SUSE Linux Enterprise Server has enough storage available for repository mirroring. Downloaded packages are stored in
/srv/www/htdocs/repo
. The amount of storage required depends on the number of repositories you mirror. We recommend at least 1.5 times the total size of all enabled repositories. Be aware that these repositories will grow substantially over time.
3 Configuring the SMT server #
Use this procedure to configure the Subscription Management Tool (SMT) on SUSE Linux Enterprise Server 12.
SUSE Linux Enterprise Server 12 is installed and up to date.
You have a SUSE Customer Center account and organization credentials.
Install the SMT pattern on SUSE Linux Enterprise Server 12:
#
zypper in -t pattern smt
Start the
smt-wizard
module in YaST:#
yast2 smt-wizard
Activate the
check box.Enter your
.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.
Select
to validate the credentials. SMT connects to the SUSE Customer Center using the provided credentials and downloads testing data.Enter the
.Verify that the correct URL appears in
, then select .For security reasons, SMT requires a separate user to connect to the database. Set a password for this user in the
field, then confirm the new password in the next field.Select
to enter any e-mail addresses that should receive SMT reports. When all e-mail addresses are entered, select .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
.By default, SMT communicates with clients via a secure protocol. If the SSL certificate does not exist, the wizard displays a warning. Select
to create the certificate.If prompted, enter and confirm a password for the CA private key, then select
.Review the
, then select .
YaST writes the SMT configuration and runs a synchronization check.
The synchronization check might take some time, even after the progress bar
says 100%
.
4 Mirroring SUSE Liberty Linux repositories with SMT #
Use this procedure to mirror the SUSE Liberty Linux repositories for Red Hat Enterprise Linux 7 and CentOS Linux 7.
The SMT server has enough storage available for repository mirroring.
Your organization credentials appear correctly in
/etc/smt.conf
.You have a SUSE Liberty Linux subscription activated in the SUSE Customer Center.
On the SMT server, update the available product and repository metadata:
#
smt-sync
Enable SUSE Liberty Linux with the following command:
#
smt-repos --enable-mirror RES7 x86_64
1 repository enabled.If your subscription includes the High Availability extension, enable the extension with the following command:
#
smt-repos --enable-mirror RES7-HA x86_64
1 repository enabled.To check whether the High Availability extension is available, run the
smt-repos RES7-HA
command.Start package mirroring for the enabled repositories, and log the output in case you need to troubleshoot errors:
#
smt-mirror --debug --logfile /var/log/smt/smt-mirror.log
Packages will now be mirrored to the SMT server once per day.
To enable GPG checking, install the res-signingkeys package on the SMT server:
#
zypper in res-signingkeys
The key is now available on the SMT server and can be imported to clients. You can check for the key in
/srv/www/htdocs/repo/keys/
on the server, or athttp://SMT_SERVER_URL/repo/keys/
in a browser.
5 Registering RHEL or CentOS Linux with SMT #
Use this procedure to register Red Hat Enterprise Linux 7 or CentOS Linux 7 with the SMT server.
CentOS Stream is not supported.
Section 4, “Mirroring SUSE Liberty Linux repositories with SMT”
The system you want to register can access the SMT server.
The system you want to register is running the latest minor release of RHEL 7 or CentOS Linux 7.
You have a SUSE Liberty Linux subscription activated in the SUSE Customer Center.
The RHEL or CentOS repositories are still enabled. These might be required for package dependencies during the registration procedure.
Import the repository signing key from the SMT server:
#
rpm --import -vv http://SMT_SERVER_URL/repo/keys/res-signingkeys.key
Create a file called
/etc/yum.repos.d/RES7.repo
and add the following content:[liberty7] name=SUSE Liberty Linux 7 baseurl=http://SMT_SERVER_URL/repo/$RCE/RES7/x86_64/ enabled=1 gpgcheck=1
To enable the High Availability repository, create a file called
/etc/yum.repos.d/RES7-HA.repo
and add the following content:[liberty7-ha] name=SUSE Liberty Linux 7 HA extension baseurl=http://SMT_SERVER_URL/repo/$RCE/RES7-HA/x86_64/ enabled=1 gpgcheck=1
Install the suseRegisterRES package:
#
yum install suseRegisterRES
Copy the SMT certificate to the system:
#
wget http://SMT_SERVER_URL/smt.crt
#
cat smt.crt >> /etc/pki/tls/cert.pem
Edit
/etc/suseRegister.conf
to point to SMT by changing theurl
value:url = https://SMT_SERVER_URL/center/regsvc/
Register the system:
#
suse_register
Disable the RHEL or CentOS repositories in
/etc/yum.repos.d
by settingenabled=0
in each.repo
file.Run the update command to make sure there are no errors:
#
yum update
You can now remove the system from any Red Hat subscription services it was registered to, and receive updates from repositories provided by SUSE Liberty Linux.
6 Troubleshooting #
- Mirroring completes with errors
If some packages could not be downloaded because of timeouts, rerun the
smt-mirror
command until all packages are downloaded.- Cannot access the SUSE Liberty Linux repository
The
repodata
directory on the SMT server will not be available until all of the packages for that repository are downloaded. If some packages could not be downloaded to the SMT server because of timeouts during the first mirroring, rerun thesmt-mirror
command until all packages are downloaded.yum update
fails because of package conflictsIf sles_es-release-server conflicts with existing packages, try the following workaround:
#
rm -r /usr/share/redhat-release
On CentOS, this removes the symbolic link between
redhat-release
andcentos-release
.Make sure you run this command without a
/
afterredhat-release
.