Spacewalk 2.2 installation on CentOS 7

Spacewalk is the upstream-project for Redhat Satellite. It’s a tool which is mainly used to list, deploy and manage packages and updates to Fedora, CentOS, SLE and even Debian installations. Currently, there is no official documentation on how to run Spacewalk on a el7 based installation like CentOS 7. The installation is not a straightforward as one might think but it is possible.

Spacewalk 2.3

Since the release of Spacewalk 2.3, it is now officially supported on CentOS 7. You can follow my post about this here: Install and use Spacewalk 2.3 on CentOS 7

Challenge accepted

At the time of writing, there was no official documentation on how to install Spacewalk on an el 7 based system. A repository on which had el7 in the name seems to be present but it some missing dependencies and has some other issues.

The explained “solution” or workaround to install Spacewalk is not something you would want to do on a production system since we are using packages outside our package manager, change supplied files. Updates could and will break them.


Spacewalk requires a lot of packages that are not in the official repositories so the first step is to add all necessary sources for those packages:


Latest release can be found here




Spacewalk repo:


According to the el6-documentation, this should be enough to complete the installation of package spacewalk-postgresql (which contains all necessary dependencies) but as you can see, we still have some issues:

What the above is saying, is that we are missing some dependencies that couldn’t be found in the configured repositories. For some of them, we’ll have to find an RPM outside our repositories.

List of packages that are missing:

  • perl(Mail::RFC822::Address)
  • perl(Net::IPv4Addr)
  • jabberd
  • spacewalk-java
  • spacewalk-java-postgresql
  • spacewalk-taskomatic

Since RHEL 7 and CentOS 7 are based on Fedora fc17 and fc18, our biggest chance is to use packages from one of those releases.

Under here is the solution which I found for each of those packages. Again, this is not a recommended way to install Spacewalk to use in production but I works in case you want tot give it a go.


I found a compatible package (from FC18) here



I found a compatible package (from FC18) here



I found a compatible package (from FC17) here
t has a dependency for udns which I found (from FC18) here



spacewalk-java, spacewalk-java-postgresql & spacewalk-taskomatic

Appaerently, the above listed spacewalk packages do not exist (yet) in the el7 repository of Spacewalk but they do exist in the nightly build. By enabling the spacewalk-nightly.repo, we can use those packages:

When trying to run the installation now, one dependency is still missing…


I found a compatible package (from FC18) here




Finally, we can install spacewalk-postgresql without issues:

Postgresql database

After the installation, we first need to install and prepare our Postgresql-database for Spacewalk:


After the installation, the database needs to be initialized:

Now that the Postgresql is ready to use, we need to determine what names we’ll use for our database and user.

In the example, I’m using spacewalk_db and spacewalk_user (you need to choose something…)

Once the database is initialized, we need to make sure that access to the database is permitted. Edit the file /var/lib/pgsql/data/pg_hba.conf and make  sure those are the only lines in the file (or add lines to the top of the file).


At this time, we can start Postgresql and create the database for spacewalk and a user.

 Some more fixes

Before finishing the Spacewalk installation, we need to adjust two files in order to make things work on CentOS 7:

Replace line 6 in file /etc/sysconfig/rhn/postgres/main.sql


Or execute the following command:

Change the following in file /etc/httpd/conf.d/zz-spacewalk-www.conf (from line 113):


Finishing the installation

Finally, if all goes well, we can finalize our Spacewalk installation by running the spacewalk-setup command:

In the above commands, pay attention that your enter the correct information regarding database-name, user and password.


Before we are able to connect to our newly configured Spacewalk-server, we need to make sure that the firewall doesn’t block access:

[jensd@spacewalk ~]$ sudo firewall-cmd –add-service=https –permanent
[jensd@spacewalk ~]$ sudo firewall-cmd –add-service=http –permanent
[jensd@spacewalk ~]$ sudo systemctl restart firewalld

Spacewalk basic setup

Finally, our spacewalk server is up and running. All that’s left to do is use your browser and navigate to the IP or hosntame of your server.

The first time, you will get the possibility to create a new spacewalk user and log in with it:


It took me some time to figure this out and the methods used are not always 100% according to best practices (the least you could say). It was more of a challenge to prove that it does work :)

For more information about how to use Spacewalk, I might spend some time later. For now, you can find it here: 

14 thoughts on “Spacewalk 2.2 installation on CentOS 7

  1. Thanks for the info!
    I’ll try to redo the installation in next coming days and will keep you posted.

  2. Hi!

    I installed Spacewalk on my CentOS 7 server and could create my admin account. After that I rebooted to make snapshot of VM. Now my serveris is back online, but login page will not open. I get cert error and after that ” The website cannot display the page” HTTP 500 error.
    What could be the problem?

  3. Hmm unfortunaly i get a error when running
    spacewalk-setup –disconnected –external-postgresql

    [root@spacewalk log]# spacewalk-setup –disconnected –external-postgresql
    * Setting up SELinux..
    ** Database: Setting up database connection for PostgreSQL backend.
    Could not connect to the database. Your connection information may be incorrect. Error: DBI connect(‘dbname=rhnschema’,’rhnuser’,…) failed: FATAL: Peer authentication failed for user “rhnuser” at /usr/share/perl5/vendor_perl/Spacewalk/ line 1642.

    Hostname (leave empty for local)?
    Database? spacewalk_db
    Username? spacewalk_user
    ** Database: Populating database.
    *** Progress: #
    Could not populate database.

    any ideas? :)

  4. ok never mind
    create extension dblink; was the problem, when i removed is the setup completed.

  5. I just determined that once I added the added the spacewalk nightly repo, I did not have to manually install any of the dependencies. They are now available without the need to manually install any of the packages you make available for download. Thanks for the info on the nightly, though. That one did hold me up.

    • At the time of writing, the packages weren’t there. As you can see, I did use jpackage.
      Thanks for the info, I should take some time to check my post and update it with the latest information.

  6. Thanks for your post.
    I tried to install it with Wiki but some informations (errors) are missing. With your post, all works fine !

  7. Thanks man! I spend so much time bugfixing the wiki. And your work saved me a LOT of further work.

  8. : AH00526: Syntax error on line 70 of /etc/httpd/conf.d/zz-spacewalk-www.conf:
    : Invalid command ‘PerlAuthenHandler’, perhaps misspelled or defined by a module not included in the server configuration
    httpd.service: main process exited, code=exited, status=1/FAILURE
    kill: cannot find process “”
    httpd.service: control process exited, code=exited status=1
    Failed to start The Apache HTTP Server.

    If i have this l=ine,

    the apache wont work..

    = 2.4>
    #PerlConfigRequire PXT/

    PerlAuthenHandler PXT::ApacheAuth

  9. Great documentation!!!!!

    I build brand new server with Cent-OS 7 minimal install and then followed your instructions.

    Warning at Step: spacewalk-setup –disconnected –external-postgresql
    It said;
    * Restarting services.
    Tomcat failed to start properly or the installer ran out of tries. Please check /var/log/tomcat*/catalina.out for errors.

    The tomcat error shows only following message
    cat /var/log/tomcat*/catalina.out
    tomcat-7.0.54 RPM installed

    When tried to start Apache, got the error

    systemctl status httpd.service
    httpd.service – The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
    Active: failed (Result: exit-code) since Thu 2015-05-14 21:34:10 EDT; 6s ago
    Process: 44560 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
    Process: 44558 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 44558 (code=exited, status=1/FAILURE)

    httpd[44558]: AH00526: Syntax error on line 69 of /etc/httpd/conf.d/zz-spacewalk-www.conf:
    httpd[44558]: Invalid command ‘PerlModule’, perhaps misspelled or defined by a module not included in the ser…guration
    httpd.service: main process exited, code=exited, status=1/FAILURE
    kill[44560]: kill: cannot find process “”
    httpd.service: control process exited, code=exited status=1
    systemd[1]: Failed to start The Apache HTTP Server.
    systemd[1]: Unit httpd.service entered failed state.

    Any suggestion? Thank You.

    • I would suggest you to look for my newer post about Spacewalk 2.3 since that version is supported on CentOS 7 and you don’t need to ugly hacks anymore to get things working. You can find the post here:

Leave a Reply to jensd Cancel reply

Your email address will not be published. Required fields are marked *