Install Spacewalk 2.2 on CentOS

This article shows you the steps to install Spacewalk 2.2 (aka Satellite) version on CentOS. To start with the install we need make sure that firewall and hostname and IP are configured correctly. Make sure that these ports are opened in the firewall.

Ports required:
Outbound open ports -- 80, 443, 4545
Inbound open ports -- 80, 443, 5222 and 5269, 69 udp if you want to use tftp (for kickstart PXE)

RAM requirements -- 2GB Minimum , 4GB Recommended

This article will be based on CentOS 6. There is a one click script as well in BASH SCRIPTS section.

Requirements:
Make sure the hostname ,static IP and host entry is setup properly.

Set Hostname

# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=spacewalk-server.hm.local

NOTE: Anything before the first "." is hostname and anything after that is the domain name.

You can get the hostname and domain with the following commands

# hostname -s

Would give you the short hostname

# hostname -d

 Would give you the domain name

IP address should be static

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:xx:xx:xx:xx:xx
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

 Add the hostname in /etc/hosts

# vi /etc/hosts
192.168.1.2 spacewalk-server.hm.local

First we need to enable some Repos for Spacewalk.
Run this command

# rpm -Uvh http://yum.spacewalkproject.org/2.2/RHEL/6/x86_64/spacewalk-repo-2.2-1.el6.noarch.rpm

Now we need to enable a 3rd aprty Repository "Jpackage".
Run this command

# 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

Need to enable another Repo for installing Spacewalk Packages
Run these command

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# yum -y install spacewalk-setup-postgresql
# yum -y install spacewalk-postgresql

Now you can go ahead with the Setup of Spacewalk

# spacewalk-setup --disconnected

Output:

# spacewalk-setup --disconnected
* 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: #####################################
* 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@localhost<br< a="">>* 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.
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Organization? Fedora
Organization Unit [spacewalk.server.com]? Spacewalk Unit
Email Address [root@localhost]?
City? Brno
State? CZ
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? CZ
** 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://spacewalk-server.hm.local to create the Spacewalk administrator account.

When you login for 1st time it will ask you to create a Username and Password and then you are good to go.

After this you also need to register clients to Spacewalk for pushing any configs/updates.

If you encounter any errors during the process, let us know via Contact Us and will get it resolved promptly.

Most Read Articles

Add/Detect a new disk in ...

Written By Farooq Mohammed Ahmed on Sunday, 11 January 2015 19:22
Add/Detect a new disk in ...

Replace SSL Certificates ...

Written By Farooq Mohammed Ahmed on Friday, 16 December 2016 08:05
Replace SSL Certificates ...

Using awk in Alias Comman...

Written By Farooq Mohammed Ahmed on Friday, 19 February 2016 14:22
Using awk in Alias Comman...

Sed - Insert Text before ...

Written By Farooq Mohammed Ahmed on Monday, 20 November 2017 00:58
Sed - Insert Text before ...

Script to Monitor Nagios ...

Written By Farooq Mohammed Ahmed on Monday, 18 July 2016 22:48
Script to Monitor Nagios ...