How to install SpaceWalk on CentOS 6 (working)

Because I could not found any guide that let me properly install SpaceWalk on CentOS 6, I decided to write this article. Kuddos go to The Noc Cave with this article, for helping me most to go in the good direction.

Please leave a comment if you encounter any problems. Thank you!

For the installation of SpaceWalk on CentOS 6, I used a bare installation of CentOS.

First install the SpaceWalk repository:

rpm -Uvh

Enable the priority plugin for yum:

yum install yum-plugin-priorities

Edit /etc/yum.repos.d/spacewalk.repo and add the following lines:


Install the following required additional repositories:

rpm -Uvh
rpm -Uvh
rpm -Uvh

Change the following line in /etc/yum.repos.d/jpackage.repo (at the bottom):




Now, yum clean all

Install postgresql:

yum install postgresql postgresql-contrib postgresql-devel postgresql-server

Enable postgresql and initialize it:

chkconfig postgresql on
service postgresql initdb
service postgresql start

Create the SpaceWalk database and user:

su – postgres -c ‘PGPASSWORD=spacepw; createdb spacedb ; createlang plpgsql spacedb ; yes $PGPASSWORD | createuser -P -sDR spaceuser’

Edit /var/lib/pgsql/data/pg_hba.conf and add the following lines so it look likes this:


# local spacewalk info
local      spacedb      spaceuser           md5
host       spacedb      spaceuser      md5
host       spacedb      spaceuser      ::1/128      md5
local      spacedb      postgres           ident

Reload postgresql:

service postgresql reload

Now, install SpaceWalk and get a coffee:

yum install spacewalk-postgresql

Finally we can initialize SpaceWalk now:

spacewalk-setup –disconnected –external-db

choose for local db (just enter)
database is: spacedbusername is: spaceuser
password is: spacepw

Next you will be asked for some certificate information. Supply with the (default) information needed and reboot your box.

After reboot you will have to adjust your firewall to allow access to ports 443 and 5222.

Your SpaceWalk server should now be available on: https://[box-ip-address]

At first access you’ll be asked to create a new user.


About Esmé