How of Spacewalk installation on CentOS 7

Share on Social Media

In this guide, you will learn Spacewalk installation on CentOS 7 or other Redhat based Linux OS. #centlinux #linux #spacewalk

What is Spacewalk? :

Spacewalk server is a free and open source Linux systems management software for provisioning, patching and configuration management of Spacewalk clients. Spacewalk is an upstream fork of Red Hat Satellite, a commercial fork developed by Red Hat. Spacewalk is distributed under GNU GPL v2 license.

Most of the configurations in this tutorial are command line based. Therefore, if you are new to Linux CLI then you should read Linux Command Line and Shell Scripting Bible, 3rd Edition (PAID LINK) by Wiley.

Spacewalk Features:

Some of the popular features of Spacewalk are.

  • Systems Inventory (Hardware and Software)
  • System Software Installation and Updates
  • System provisioning (via Kickstart)
  • Management and deployment of configuration files
  • Provision of virtual Guests
  • OpenSCAP Auditing of client systems

Environment Specification:

We have configured a CentOS 7 minimal installed virtual machine for this tutorial.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 7.7
  • Hostname – spacewalk-01.example.com
  • IP Address – 192.168.116.213 /24

Install Spacewalk Yum Repository:

Connect with spacewalk-01.example.com using ssh as root user.

Spacewalk yum repositories are available at Spacewalk project website.

Download and install Spacewalk yum repository on CentOS 7.

# curl -s https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/spacewalk-2.9/repo/epel-7/group_spacewalkproject-spacewalk-2.9-epel-7.repo > /etc/yum.repos.d/spacewalk.repo

Install EPEL Yum Repository:

Spacewalk requires some packages from EPEL (Extra Packages for Enterprise Linux). Therefore, we are also required to install EPEL before installing Spacewalk.

# yum install -y epel-release.noarch

Spacewalk also requires latest version of some Java packages that are not available in EPEL yum repository. However, Spacewalk provides a yum repository of it’s own for these packages. Therefore, we are installing it as well.

# curl -s https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/java-packages/repo/epel-7/group_spacewalkproject-java-packages-epel-7.repo > /etc/yum.repos.d/spacewalk-java.repo

Build cache for newly added yum repositories.

# yum makecache fast

Install PostgreSQL on CentOS 8:

Spacewalk needs a backend database for storing it’s data. Current versions of Spacewalk supports PostgreSQL (8.4 or later) and Oracle RDBMS (10g or later).

Being a FOSS (Fan of Open Source Software), we definitely prefer PostgreSQL for this tutorial.

Spacewalk yum repository provides an embedded version of PostgreSQL for Spacewalk software.

We are installing this PostgreSQL database backend as follows.

# yum install -y spacewalk-setup-postgresql

Spacewalk Installation on CentOS 7:

Now, we can install Spacewalk using yum command.

# yum install -y spacewalk-postgresql

Allow HTTPS service in CentOS 7 firewall.

# firewall-cmd --add-service=https
success
# firewall-cmd --runtime-to-perm
success

Configure Spacewalk on CentOS 7 as follows.

# spacewalk-setup
* Setting up SELinux..
** 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: ############################
* Configuring tomcat.
* 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? root@spacewalk-01.example.com
* Performing initial configuration.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? Y
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Cname alias of the machine (comma seperated)? spacewalk-01.example.com
Organization? Ahmer's SysAdmin Recipes
Organization Unit [spacewalk-01]? ITLAB
Email Address [root@spacewalk-01.example.com]?
City? Karachi
State? Sindh
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? PK
** 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..
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]?
* Restarting services.
Installation complete. ·
Visit https://spacewalk-01 to create the Spacewalk administrator account.

Browse URL https://spacewalk-01.example.com in a web browser.

The browser may display a security warning because our SSL certificate is self-signed. We are ignoring the warning and let the browser continue to the Spacewalk website.

Spacewalk Create First User

Create an Admin user here and click on “Create Organisation”.

Spacewalk Overview

Spacewalk is ready for use now. You can refer to Spacewalk Documentation for its usage information.

Click on exit icon at top right corner of the page.

Spacewalk Login

Now, you are at the Spacewalk login page.

Conclusion:

In this guide, you have learned about Spacewalk installation on CentOS 7 or other Redhat based Linux OS.