Share, , Google Plus, Pinterest,


Posted in:

Install Spacewalk on CentOS 6

Spacewalk is an open source Linux systems management solution. Spacewalk is a community project and Red Hat Satellite has derived from SpacewalkSpacewalk can manage all Red Hat derived Linux distributions like Fedora, CentOS, Scientific Linux, Oracle Linux,…

Spacewalk enables you to inventory your systems, manage configuration, act as central repository for your systems, monitor your systems and so on. You can choose to use PostgreSQL or Oracle Database XE (Express max 3GB database) database. I have been using Spacewalk with PostgreSQL for some time now and am quite happy with it. I currently have subscribed 40+ Linux systems in mixed distributions (CentOS 5, 6 and Oracle Linux 5, 6) and it works OK. I wonder how Spacewalk manages in environments with 100+, 200+ systems… In this post i will explain how to install Spacewalk with PostgreSQL on CentOS 6.

Install Spacewalk on CentOS 6
Install Spacewalk on CentOS 6

What Can Spacewalk Do?

Spacewalk is an open source (GPLv2) Linux systems management solution that allows you to:

  • Inventory your systems (hardware and software information)
  • Install and update software on your systems
  • Collect and distribute your custom software packages into manageable groups
  • Provision (kickstart) your systems
  • Manage and deploy configuration files to your systems
  • Monitor your systems
  • Provision and start/stop/configure virtual guests
  • Distribute content across multiple geographical sites in an efficient manner.

Pre-requisites – before you install Spacewalk:

  • 12GB or more free disk space on PostgreSQL partition
  • Working FQDN name resolution

Spacewalk configure script checks /usr/share/pgsql and /var/lib/pgsql locations (default PostgreSQL install location on CentOS) for disk space availability (< 12GB). You need to make sure more than 12GB of free space is available at these locations! You can solve this by creating a large root partition or to create new mount points with more that 12GB of free space.

Let’s Install Spacewalk on CentOS 6!

1. Disable SELinux and IPtables

For this guide SELinux and iptables were disabled and CentOS 6 was fully updated!

2. Install wget for Jpackage repo

[root@foo1 ~]# yum install wget -y

3. Set up necessary repositories

[root@foo1 ~]# rpm -Uvh
[root@foo1 ~]# rpm -Uvh
[root@foo1 ~]# wget
[root@foo1 ~]# mv jpackage50.repo /etc/yum.repos.d/

4. Install PostgreSQL database

In this guide we will be configuring Spacewalk to work with PostgreSQL database. Spacewalk has prepared automated install of PostgreSQL. It is simple, efficient and fast – the obvious choice.

[root@foo1 ~]# yum install spacewalk-setup-postgresql -y

5. Install Spacewalk

[root@foo1 ~]# yum install spacewalk-postgresql -y

6. Configure Spacewalk

Run spacewalk-setup in disconnected mode and enter the information it asks you for.

[root@foo1 share]# spacewalk-setup --disconnected
** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: #
** Database: Installation complete.
** Database: Populating database.
*** Progress: ####################################
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
** GPG: Creating /root/.gnupg directory
You must enter an email address.
Admin Email Address?
* Performing initial configuration.
* Activating Spacewalk.
** Loading Spacewalk Certificate.
** Verifying certificate locally.
** Activating Spacewalk.
* Enabling Monitoring.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? 
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring tomcat.
** /etc/sysconfig//tomcat6 has been backed up to tomcat6-swsave
** /etc/tomcat6//server.xml has been backed up to server.xml-swsave
** /etc/tomcat6//web.xml has been backed up to web.xml-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password? 
Re-enter CA certificate password? 
Organization? GeekPeek.Net
Organization Unit []? 
Email Address []? 
City? Ljubljana
State? Slovenia
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? SI
** SSL: Generating CA certificate.
** SSL: Deploying CA certificate.
** SSL: Generating server certificate.
** SSL: Storing SSL certificates.
* Deploying configuration files.
* Update configuration in database.
* Setting up Cobbler..
Processing /etc/cobbler/modules.conf
`/etc/cobbler/modules.conf' -> `/etc/cobbler/modules.conf-swsave'
Processing /etc/cobbler/settings
`/etc/cobbler/settings' -> `/etc/cobbler/settings-swsave'
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]? 
* Restarting services.
Installation complete.
Visit to create the Spacewalk administrator account.

7. Configure Spacewalk Admin user

Please visit https://hostname.domainname and create Spacewalk Web Administrator user.

Install Spacewalk on CentOS 6
Install Spacewalk on CentOS 6

Click “Create Login” and voila! You are inside your Spacewalk instance. Now you need to add your systems in your Spacewalk Management, create Software Channels, Repositories, Configuration Channels and so on… We finished our “Install Spacewalk on CentOS 6” guide!

I will be covering all this in my next post on Spacewalk! Stay tuned! 🙂

  • Alan

    Nice article. I’m going through the same thing right now and gearing up to start a non-profit and take donated computers, load them with Fedora and distribute to children who need them… as well as teaching computer classes.
    I look forward to more posts. Also, you don’t need to disable SELinux… Spacewalk is SELinux friendly.

    • Mitch

      Hi Alan! Thanks for your comment and i really like the idea of your project! If GeekPeek.Net can help you anyhow please let me know. Would really be glad to! Regards, Mitch

  • ibtissam

    Hi ,
    @ Mitch ,thank you for your effort , i’m looking for an open source Patch management solution for linux servers (Redhat Distributions) , i had already start by studying SpaceWalk, but if you knew some other sophisticated tools (free)that you can recommended it to me , i will be gratefull , thanks

    • Mitch

      Hi ibtissam! If you are looking for patch management more than a configuration management solution then Spacewalk is the way to go. I have not found any centralized patch management solution for RHEL based systems other than Spacewalk. If you are looking for configuration management solution i would recomment Puppet. Regards, Mitch

      • ibtissam

        Ok , thank you Mitch , i need a patch management , so i will try spacewalk and i hope that it’ll meet my requirement , Best regards

  • Faruk

    what about configuring / registering the clients ?
    osad ? or uploading contents to the server ??

    • Mitch

      Hi Faruk! I am planning to write about registering clients and enabling other functionalities but i am so overwhelmed with work right now… Let’s say it’s comming soon 🙂

      • Faruk

        thx =)

        • Mitch

          No problem Faruk!

  • Dave

    FYI, I also had to add the EPEL repo, otherwise the install failed on unresolved dependencies. I was using a vanilla CentOS image at AWS.

    • Mitch

      Hi Dave! Well i think adding EPEL repo is covered in my tutorial in Step 3. Regards, Mitch

  • ibtissam

    Hi Mitch ,
    Please i have a problem with spacewalk , when i want to register my sysytem to be patched with spacewalk i get an error (Class 70, all available subscription for the requested channel have been exhausted ) , and other thing , im a little confused about the channels configuration , regarding CentOs , from where i can get information about GPG part
    Sorry for disturbing you (Please , can i have your email to send you a snapshot about the problem )
    Best regards

    • Mitch

      Hi ibtissam and sory for late response. Send me an email at info[at] Regards, Mitch

  • Sahil

    Hi Mitch , Thank you very much for overview and installtion for space walk, I want to learn more about space walk could u please share more information.
    Once again thank you very much

  • sachin

    Nice Article…
    can spacewalk be used for patching Ubuntu as well ?
    Can I manage different OS like RHEL,CentOS,Ubuntu from same Spacewalk server ?

    • Mitch

      Hi sachin, i am afraid you can not patch and manage ubuntu. Spacewalk can only manage rhel based distros. Regards, Mitch

  • Daniel

    For production systems it’s generally not a good idea to blindly disable iptables. What would the necessary ports be to have this solution running?

  • Camelle

    Why is it that when i try to run this command [root@foo1 ~]# rpm -Uvh
    [root@foo1 ~]# wget there is an error 🙁
    Please help .

  • Afreen


    Can any body add how to use more efficiently “spacewalk”

    • Md Aftab

      Actually i am using puppet for these, that’s more better.

      • Mitch

        Hi Md Aftab, you are correct, puppet is much more powerful when it comes to configuration management … but overall for Red Hat based systems i think Spacewalk enables you to do much more – like patch repository, basic monitoring, … Regards, Mitch

  • Lonly Boyd

    I must be making an error, when i run yum -y install spacewalk-setup-postgresql i get an error saying no pkg available so i do a yum list spacewalk* and non is listed i do see the spacewalk-repo-noarch. in yum repolist i see the repos are in yum.repos.d and it did update the Metadata did the project go south?