8i | 9i | 10g | 11g | 12c | 13c | 18c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Linux » Here

Spacewalk : Installation on Oracle Linux

This article explains how to install Spacewalk on Oracle Linux. You do not need a support contract for Oracle Linux to use this method.

Related articles.

Server Prerequisites

Start with a minimum installation of Oracle Linux 6 or 7. You can add the desktop packages if you want, but they are not necessary. Once the OS installation is complete, perform the following tasks as the "root" user.

Make sure the Spacewalk server has a fully qualified domain name, with an entry in the "/etc/hosts" file.     ol7-sw.localdomain ol7-sw

Make the necessary firewall changes.

# OL7
firewall-cmd --add-service=https --permanent
firewall-cmd --add-service=http --permanent
firewall-cmd --reload

# OL6
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
service iptables save


You will need to install a few repositories before you get started.

Enable the Oracle Linux optional packages, addons and EPEL repository. For example, on Oracle Linux 7 set "enabled=1" in the following entry of the "/etc/yum.repos.d/public-yum-ol7.repo" file.

name=Oracle Linux $releasever Optional Latest ($basearch)

name=Oracle Linux $releasever Developement Packages ($basearch)

name=Oracle Linux $releasever Add ons ($basearch)

At the time of writing the Oracle Linux 7 EPEL repository didn't contain the "jabberd" package, so you still have to used the regular EPEL repository for your version.

# OL7
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# OL6
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

Add the Spacewalk repository for your version. There is an Oracle Linux Spacewalk repository, but it usually lags behind the main version.

# OL7
rpm -Uvh http://yum.spacewalkproject.org/2.7/RHEL/7/x86_64/spacewalk-repo-2.7-2.el7.noarch.rpm

# OL6
rpm -Uvh http://yum.spacewalkproject.org/2.7/RHEL/6/x86_64/spacewalk-repo-2.7-2.el6.noarch.rpm

Add the repository for additional Java dependencies.

# OL7
(cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/java-packages/repo/epel-7/group_spacewalkproject-java-packages-epel-7.repo)

# OL6 (add both)
(cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/java-packages/repo/epel-7/group_spacewalkproject-java-packages-epel-7.repo)
(cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/epel6-addons/repo/epel-6/group_spacewalkproject-epel6-addons-epel-6.repo)

Install Spacewalk

To keep things simple, we'll do a default installation using postgreSQL as the Spacewalk database.

# Configure the Spacewalk database.
yum install spacewalk-setup-postgresql -y

# Install Spacewalk
yum install spacewalk-postgresql -y

Create an answer file for the configuration of Spacewalk, adjusting the values as required.

cat > /tmp/answer-file.txt <<EOF
admin-email = root@localhost
ssl-set-cnames = spacewalk2
ssl-set-org = Spacewalk Org
ssl-set-org-unit = spacewalk
ssl-set-city = My City
ssl-set-state = My State
ssl-set-country = US
ssl-password = spacewalk
ssl-set-email = root@localhost
ssl-config-sslvhost = Y

Configure Spacewalk using the answer file created previously.

# Run this first to get round UTF8 issue.
# It will remove any existing PostgreSQL database.
rm -Rf /var/lib/pgsql/data
postgresql-setup initdb

# Now run normal config.
spacewalk-setup --answer-file=/tmp/answer-file.txt

You can restart the Spacewalk service using the following commands.

/usr/sbin/spacewalk-service stop
/usr/sbin/spacewalk-service start

/usr/sbin/spacewalk-service restart

You can now access the Spacewalk console using the following URL on the server.


If you want the console to be accessible externally, amend the "/etc/tomcat/server.xml" file as follows.

# From
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" address=""/>
# To
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" address=""/>

Restart Spacewalk.

/usr/sbin/spacewalk-service restart

Spacewalk Console

The first time you go to the Spacewalk URL you will be prompted to create a new organization with administrator login credentials. Enter the required information and click the "Create Organization" button.

Spacewalk : Create Organization

You are now able to start using Spacewalk.

Spacewalk : Overview

For more information see:

Hope this helps. Regards Tim...

Back to the Top.