Latest

Tuesday, 22 October 2019

How to Install Spacewalk Server on CentOS 7

Install Spacewalk Server on CentOS 7

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.

In this article, we are installing Spacewalk server on CentOS 7.

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 by Wiley.

 

Table of Contents:

Install Spacewalk Server on CentOS 7

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 based 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

 

Installing Spacewalk and EPEL yum repositories on CentOS 7:

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

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 Database for Spacewalk:

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

 

Installing Spacewalk Server 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.

01-install-spacewalk-centos-7-create-organization

Create an Admin user here and click on "Create Organisation".

02-install-spacewalk-centos-7-dashboard

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.

03-install-spacewalk-centos-7-login

Now, you are at the Spacewalk login page.

We have successfully installed Spacewalk server on CentOS 7.

If you find this article useful? Don't you mind support us by Buy Me A Coffee


2 comments:

  1. Dude you Rock Very straight forward documentation. now time to learn i think how to operate it :) thankyou

    ReplyDelete
  2. Worked like a charm.
    Thank you.

    ReplyDelete

© 2022 CentLinux. All Rights Reserved.