How to subscribe centos server to Katello/Foreman. This tutorial will guide you through steps needed to subscribe CentOS server to consume content from Katello Server. This assumes you already have katello installed and running, you can use my Ansible Playbook Available to do quick installation.

Syncing repositories: How To Sync CentOS 8 repositories on Satellite / Katello / Foreman

All of these steps are performed on the host you want to register

Step 1: Add EPEL and Foreman repository

Add EPEL and Foreman repository to CentOS 7 Linux system.

sudo yum -y install
sudo yum install -y

Step 2: Install subscription manager

Install subscription-manager tool on CentOS machine to be enrolled.

sudo yum -y install subscription-manager

Then download and install ca-consumer package to get a copy of the CA certificate from your Katello/Foreman Server.

export katello_fqdn=""
sudo rpm -Uvh http://$[katello_fqdn]/pub/katello-ca-consumer-latest.noarch.rpm

For above command to work, you should be able to resolve hostname.

Step 3: Register CentOS Server on Katello Server:

Use the subscription-manager command to register your CentOS machine on Katello server.

sudo subscription-manager register --org="YourOrg" \


  • YourOrg with the name of your organization configured on Katello.
  • activation-key-name with the name of the activation key set.

Activation key need to be created on foreman prior to running above command.

Step 4: Install Katello agent tools

Install the katello-host-tools and katello-agent package which reports errata & package profile information, but does not allow you to run remote actions on the clients.

sudo yum -y install katello-host-tools  katello-agent katello-host-tools-tracer

The Katello Agent must be enabled on client servers to push the updates from the Katello Dashboard. It also provides information about errata that are applicable to the system to the Katello Dashboard from there you can get to know all the details of what is required to keep the client-server up-to-date.

Start the Katello agent service and enable it to start at the system boot.

systemctl start goferd
systemctl enable goferd

Step 4: Update CentOS repositories

Remove or move all of your repositories except redhat.repo present inside the /etc/yum.repos.d/.

cd /etc/yum.repos.d/
sudo mkdir old
sudo mv CentOS-* epel*  katello* old/

Verify whether the Katello-agent is installed on the host using the Katello Dashboard.

Hosts –> Content Hosts –>

To install a package from the UI, go to Hosts –> Content Hosts –> Select Host  –> Packages.

Chose Package Action as “Package Remove” and then type the name of a package; then click on perform.

Related guides:

How to manage CentOS 8 from Cockpit

Install Foreman on Ubuntu 18.04

Automate repetitive tasks with Ansible

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here