Registering a RedHat Enterprise 6 Server with Spacewalk

  1. Take an existing RedHat Enterprise Linux 6 installation
  2. Remove existing RedHat repositories
  3. Install Spacewalk client
  4. Register with the local Spacewalk server using an “Oracle Linux 6” activation key
  5. Perform a package update to bring the system inline with Oracle Linux 6 packages
  6. Remove RHEL specific packages

Remove existing repo’s (NB: Not all files will exist)

rm /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/RedHat.repo /etc/yum.repos.d/public-yum-ol6.repo

Install Spacewalk client Repository

rpm -Uvh

Install EPEL (Extra Packages for Enterprise Linux) repository

rpm -Uvh

Install RPM GPG Keys

cd /tmp
rpm --import ./RPM-GPG-KEY-oracle-ol6
rpm --import ./RPM-GPG-KEY-spacewalk-2015
rpm --import ./RPM-GPG-KEY-EPEL-6

Install Spacewalk client tools, osad

yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin osad

Install Spacewalk server trusted CA

rpm -Uvh http://${SPACEWALK_SERVER}/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm

Register server with Spacewalk server

rhnreg_ks --serverUrl=https://${SPACEWALK_SERVER}/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=${ACTIVATION_KEY}

Start OSAD tool

service osad start

Remove RedHat specific rpm’s as well as unnecesary repositories

yum erase libreport-plugin-rhtsupport epel-release-6-8 subscription-manager spacewalk-client-repo.noarch

Bring local server upto date

yum update