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 http://yum.spacewalkproject.org/2.4-client/RHEL/6/x86_64/spacewalk-client-repo-2.4-3.el6.noarch.rpm

Install EPEL (Extra Packages for Enterprise Linux) repository

rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

Install RPM GPG Keys

cd /tmp
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
rpm --import ./RPM-GPG-KEY-oracle-ol6
wget http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2015
rpm --import ./RPM-GPG-KEY-spacewalk-2015
wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
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