Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Registering RHEL 7 or CentOS Linux 7 with SMT
SUSE Liberty Linux

Registering RHEL 7 or CentOS Linux 7 with SMT

Publication Date: April 25, 2024

This guide describes how to use SUSE Liberty Linux to update Red Hat Enterprise Linux 7 or CentOS Linux 7.

Copyright © 2022–2024 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 https://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.

Important

CentOS Stream is not supported.

You can register RHEL 7 or CentOS Linux 7 with one of the following tools:

  • Subscription Management Tool (SMT) on SUSE Linux Enterprise 12

  • Repository Mirroring Tool (RMT) on SUSE Linux Enterprise 15

  • SUSE Manager

This guide describes how to register with SMT on 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.

Procedure overview
  1. Section 2, “Requirements”. Make sure you have everything required for the following procedures.

  2. 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.

  3. 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.

  4. Section 5, “Registering RHEL or CentOS Linux with SMT”.

Note
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.

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 up to date. This machine will be the SMT server. You can use the SUSE Liberty Linux subscription to register SLES. To install SLES 12, see Installation Quick Start.

  • The systems you want to register can reach the SMT server.

  • The SMT 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.

Requirements
  • SUSE Linux Enterprise Server 12 is installed and up to date.

  • You have a SUSE Customer Center account and organization credentials.

Procedure 1: Configuring the SMT server
  1. Install the SMT pattern on SUSE Linux Enterprise Server 12:

    # zypper in -t pattern smt
  2. Start the smt-wizard module in YaST:

    # yast2 smt-wizard
  3. Activate the Open Port in Firewall check box.

  4. Enter your Organization (Mirroring) Credentials.

    Tip

    To find your organization credentials, log in to the SUSE Customer Center, select your organization from My Organizations, and click Proxies. Your organization's Mirroring credentials are in the top right corner.

  5. Select Test to validate the credentials. SMT connects to the SUSE Customer Center using the provided credentials and downloads testing data.

  6. Enter the SCC E-mail Used for Registration.

  7. Verify that the correct URL appears in Your SMT Server URL, then select Next.

  8. For security reasons, SMT requires a separate user to connect to the database. Set a password for this user in the Database Password for smt User field, then confirm the new password in the next field.

  9. Select Add to enter any e-mail addresses that should receive SMT reports. When all e-mail addresses are entered, select Next.

  10. If a password for the MariaDB root user is already set, enter the password when prompted, then select OK.

    If no password is set for the MariaDB root user, enter and confirm a new password when prompted, then select OK.

  11. By default, SMT communicates with clients via a secure protocol. If the SSL certificate does not exist, the wizard displays a warning. Select Run CA Management to create the certificate.

  12. If prompted, enter and confirm a password for the CA private key, then select OK.

  13. Review the Installation Overview, then select Next.

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.

Requirements
  • Section 3, “Configuring the SMT server”

  • 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.

Procedure 2: Mirroring SUSE Liberty Linux repositories with SMT
  1. On the SMT server, update the available product and repository metadata:

    # smt-sync
  2. Enable SUSE Liberty Linux with the following command:

    # smt-repos --enable-mirror RES-7-Updates
    1 repository enabled.
  3. If your subscription includes the High Availability extension, enable the extension with the following command:

    # smt-repos --enable-mirror RES-7-HA-Updates
    1 repository enabled.
    Tip

    To check whether the extension is available, run the following command: smt-repos RES-7-HA-Updates

  4. 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.

  5. 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 at http://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.

Important

CentOS Stream is not supported.

Requirements
Procedure 3: Registering RHEL or CentOS Linux with SMT
  1. Import the repository signing key from the SMT server:

    # rpm --import -vv http://SMT_SERVER_URL/repo/keys/res-signingkeys.key
  2. 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/SUSE/Updates/RES/7/x86_64/update
    enabled=1
    gpgcheck=1
  3. 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/SUSE/Updates/RES-HA/7/x86_64/update
    enabled=1
    gpgcheck=1
  4. Install the suseRegisterRES package:

    # yum install suseRegisterRES
  5. Copy the SMT certificate to the system:

    # wget http://SMT_SERVER_URL/smt.crt
    # cat smt.crt >> /etc/pki/tls/cert.pem
  6. Edit /etc/suseRegister.conf to point to SMT by changing the url value:

    url = https://SMT_SERVER_URL/center/regsvc/
  7. Register the system:

    # suse_register
  8. Disable the RHEL or CentOS repositories in /etc/yum.repos.d by setting enabled=0 in each .repo file.

  9. 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 the smt-mirror command until all packages are downloaded.

yum update fails because of package conflicts

If 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 and centos-release.

Important

Make sure you run this command without a / after redhat-release.