How to install and register Linux clients with Spacewalk server 2.8

In earlier guides, the server-side setup has been completed. Currently, its time to set up with our client-side installation and configuration. Initially, we need to install the client packages by following we need to register with Spacewalk server using “rhnreg_ks” or “rhn_register“.

More Spacewalk related topics are as follows:



Step 1:

Let’s start to add the required repositories for client packages.

RHEL 6 clients:

Install the client packages from official spacewalk repository for RHEL 6 based Linux client servers. EPEL repo needs to be available to resolve few of dependencies.

# rpm -Uvh https://copr-be.cloud.fedoraproject.org/results/@spacewalkproject/spacewalk-2.8-client/epel-6-x86_64/00742644-spacewalk-repo/spacewalk-client-repo-2.8-11.el6.noarch.rpm
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

 

RHEL 7 clients:

We need to add with official client repositories for RHEL 7 based clients too.

# https://copr-be.cloud.fedoraproject.org/results/%40spacewalkproject/spacewalk-2.8-client/epel-7-x86_64/00742644-spacewalk-repo/spacewalk-client-repo-2.8-11.el7.centos.noarch.rpm
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

 

Step 2:

Install support program packages for spacewalk clients.

# yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin -y

 

How to install and register Linux clients with Spacewalk server 2.8 2
Client registration package

 

Step 3:

Once performed with client package installation we need to install with Spacewalk’s CA certificate on the client servers to enable SSL communication. To find the CA certificate navigate to Spacewalk’s /pub URL from browser and download it to spacewalk server using curl.

https://spacewalk.oel7.local/pub/
# curl --insecure -O https://spacewalk.oel7.local/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm
# rpm -ivh rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm

 

How to install and register Linux clients with Spacewalk server 2.8 3
Download CA certificate from /pub directory

 

How to install and register Linux clients with Spacewalk server 2.8 4
Install CA Certificate

 

Step 4:

Finally, we are good to register our clients with Spacewalk server using the activation key.

How to install and register Linux clients with Spacewalk server 2.8 5
Activation Key

 

To get the activation key from spacewalk server UI navigate to Systems –> Activation Keys –> copy the key “1-centoslinux7-x86_64

There are two ways we can register Linux servers with the spacewalk as a client.

  1. Automated way using the rhnreg_ks command with an activation key.
  2. The manual method using rhn_register using TUI.

Option 1:

Use the command with URL, CA certificate and activation key.

# rhnreg_ks --serverUrl=https://spacewalk.oel7.local/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-centoslinux7-x86_64

 

How to install and register Linux clients with Spacewalk server 2.8 6
Registering client with spacewalk server

 

How to install and register Linux clients with Spacewalk server 2.8 7
Successfully registered client-server

 

Client-server has been registered with the spacewalk server.

How to install and register Linux clients with Spacewalk server 2.8 8
More information about client-server

 

How to install and register Linux clients with Spacewalk server 2.8 9
Available updates for client-server

 

Clear the default repo file from /etc/yum.repo.d/ by moving into any one of the directories.

How to install and register Linux clients with Spacewalk server 2.8 10
Clear the existing repo files

 

List the available repositories using “yum repolist all” command.

How to install and register Linux clients with Spacewalk server 2.8 11
List Yum repositories




Option 2:

We can register a client using “rhn_register” command which will prompt to enter the admin username and password. This is a manual method which can be done in TUI mode by following NEXT –> NEXT –> NEXT –> FINISH. It’s good to follow option 1 for registering a client by automating it.

# rhn_register

 

If clients do not reflect the available updates in Spacewalk UI force the client to sent information by running.

# rhn_check

 

That’s it we have registered a Linux server with the spacewalk server as a client to receive packages and updates.

Conclusion:

To manage the client machines from the spacewalk, we have done with simple installation steps in a Linux server and made it as a client by subscribing with Spacewalk server. It provides us with wide support for provisioning, managing configuration, running schedules and much more. Let us see more topic on the spacewalk in upcoming articles, subscribe to our newsletter by submitting your email ID at the bottom of this page.

3 thoughts on “How to install and register Linux clients with Spacewalk server 2.8

  1. Thank you for your article 🙂 It’s really helpful, could you please explain how to create
    channel and repository for Debian ?

Comments are closed.