In this tutorial, I am assuming that the Spacewalk server is already installed & Configured. Click Here to go through the spacewalk installation steps. In my scenario I have more than 100 Linux Servers (Centos 6), I will do the patching using the spacewalk tool. For this, I have to register all Linux servers in spacewalk and will push all updates from the admin panel.
Follow below steps to register CentOS servers in Spacewalk
Step 1: Login To admin Panel of Spacewalk and add a Channel.
Click on the channel —> then click on Manage software Channel —> Click on Create New Channel.
Also, select the option “Public and may be accessed by any of the trusted organizations trusted by this organization” which is under Channel Access Control. Leave all other fields as it is and click on Create channel.
Step 2: Now Create & add repository to the Channel.
Go To Channel —-> click on Manage Repository.
Specify the Repository Label and Path of Repository and Click on Create Repository, in my I have put the repository on ftp server.
Add Repository to channel
Now Click on “Manage Software channel” —-> then click on the “channel Name” —> then click on “Repository” —-> then select the repository that we have created in the above step and then click on update repository.
Step 3: Now Upload the Packages / RPMS to Channel using below command.
# spacewalk-repo-sync --channel centos6_x86_all --type yum
Step 4: Now Generate Activation Key, which will be used for Client Registration with Spacewalk.
From the Overview, click on the Activation Key —-> then click on Create Key.
Step 5: Install Spacewalk client’s packages on CentOS 6 Servers.
# yum install -y rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin rhncfg rhncfg-actions rhncfg-client
Now Register Linux Server with Spacwalk.
# rhnreg_ks --force --serverUrl=http://192.168.2.51/XMLRPC --activationkey=1-6f0183f8cb1815adeebe38f4ffd445d6 # rhn-actions-control --enable-all
The above commands will register your Linux box with Spacewalk, just replace IP address of the spacewalk server and activation key according to your setup.
Step 6: Now See, are there any updates available for Register System?
Now Login to Spacewalk admin panel, click on System, then click on Register Server Name, in my case, it is “space-client.nsitmail.com”. As we can see updates are available.
Step 7: Schedule to install all the updates.
Select all the packages and Click on Upgrade Package.
When We click on ‘Upgrade Package’, then it will ask to schedule an upgrade as shown below.