CentOSLinuxTutorials

How To Install Spacewalk on CentOS 7

Install Spacewalk on CentOS 7

In this tutorial, we will show you how to install and configuration of Spacewalk on your CentOS 7. For those of you who didn’t know, Spacewalk is the package and system management solution for Redhat-derived Linux operating systems such as CentOS, Scientific Linux, and Fedora, by the spacewalk community. It is released under the GPLv2 license. It offers a more flexible way to do. Spacewalk enables you to inventory your systems, manage configuration, act as a central repository for your systems, monitor your systems, and so on.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of Spacewalk on the CentOS 7 server.

Prerequisites

  • A server running one of the following operating systems: CentOS 7.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Spacewalk on CentOS 7

Step 1. First, you need to enable the EPEL repository on your system.

yum install epel-release

Add JPackage repository:

cat > /etc/yum.repos.d/jpackage-generic.repo << EOF
[jpackage-generic]
name=JPackage generic
#baseurl=http://mirrors.dotsrc.org/pub/jpackage/5.0/generic/free/
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF

Add Spacewalk repository:

rpm -Uvh http://yum.spacewalkproject.org/2.3/RHEL/7/x86_64/spacewalk-repo-2.3-4.el7.noarch.rpm

Step 2. Install the PostgreSQL database for Spacewalk.

Spacewalk uses a database to store its primary data, it supports either PostgreSQL or Oracle RDBMS. In our case we are using PostgreSQL:

yum install spacewalk-setup-postgresql

Step 3. Install Spacewalk.

Now, install the Spacewalk server using the command:

yum install spacewalk-postgresql

Step 4. Firewall configuration.

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

sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --reload

Step 5. Configure Spacewalk.

If you have installed an embedded database, then use it. It will ask you to enter the admin mail and organization details to generate the self-signed certificate for secured access:

[root@idroot.us ~]# 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? admin@idroot.us
* 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? idroot.us
Organization Unit [server.idroot.us]? 
Email Address [admin@idroot.us]? 
City? jogja
State? indonesia
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 https://server.idroot.us to create the Spacewalk administrator account.

At this point, Spacewalk is installed, configured, and ready to use. Refer to the next section to get started with Spacewalk.

Step 5. Accessing Spacewalk.

The spacewalk will be available on HTTPS port 443 by default. Open your favorite browser and navigate to https://hostname.yourdomain.com and complete the required steps to finish the installation. If you are using a firewall, please open ports 80 and 443 to enable access to the control panel.

Congratulations! You have successfully installed Spacewalk. Thanks for using this tutorial for installing the Spacewalk server on CentOS 7 system. For additional help or useful information, we recommend you check the official Spacewalk website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button