Search Posts on Binpipe Blog

Installing Spacewalk (1.5) with PostgreSQL (8.4) on CentOS 6.

SPACEWALK provides software content management, provisioning and monitoring capabilities. It will enable you to kickstart systems, as well as manage and deploy configuration files. Spacewalk's monitoring feature allows you to view monitoring status for your systems alongside their software update status. Spacewalk also has virtualization capabilities to enable you to provision, control, manage, and monitor virtual Xen guests.

It requires either Oracle or Postgresql as database. I used Postgresql because I believe in Open-source :)

Prerequisites need to be configured and only then spacewalk can be installed successfully on CentoOS6, You have to use about 120GB HDD and 4GB of RAM for the buildout, then you can reduce the RAM to 2GB for operation. a CentOS-6 as a minimal install setting with a DNS record for the system name is ideal.

The following steps can be used sourced from here:
yum upgrade -y
# Install some repos that make the install much easier 
 rpm -Uvh
 rpm -Uvh
 rpm -ihv
# Get your GPG keys for redhat 
 yum install -y wget
 wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# Setup to use available java packages (paste into the command line) 
 cat > /etc/yum.repos.d/jpackage-generic.repo << EOF 
 name=JPackage generic
# Work on PostgreSQL 8.4 or better 
 yum install -y 'postgresql-server > 8.4'
 chkconfig postgresql on
 service postgresql initdb
 service postgresql start
# Setup the PostgreSQL DB 
 su - postgres -c 'PGPASSWORD=spacepw; createdb spaceschema ; createlang plpgsql spaceschema ; yes $PGPASSWORD | createuser -P -sDR spaceuser'
#Setup the security in the file below adding the lines show _before_ the lines that mention 'all' users 
 vi /var/lib/pgsql/data/pg_hba.conf
 local   spaceschema     spaceuser                       md5
 host    spaceschema     spaceuser     md5
 host    spaceschema     spaceuser       ::1/128         md5
# Reload the server 
 service postgresql reload
# Test the connection (exit with \q) 
 PGPASSWORD=spacepw psql -a -U spaceuser spaceschema
 PGPASSWORD=spacepw psql -h localhost -a -U spaceuser spaceschema
# Make sure you don't have any conflicting packages
 yum remove cobbler-web
 vi /etc/yum.conf and make sure you exclude=cobbler-web
# Build the RPM that is missing from CentOS
# This means we need some tools for the build environment and
# specifically, some tools for the RPM (policycoreutils-python) 
 yum install rpm-build redhat-rpm-config make gcc policycoreutils-python
 rpm -ivv selinux-policy-3.7.19-93.el6.src.rpm
 cd ~/rpmbuild
 rpmbuild --rebuild ../selinux-policy-3.7.19-93.el6.src.rpm
 yum localinstall --nogpgcheck /root/rpmbuild/RPMS/noarch/*.rpm
# Install Spacewalk 
 yum install spacewalk-postgresql
Now that spacewalk is installed we will discuss the usage of space walk in upcoming posts. 
UPDATE: This document from fedora wiki seems to be more descriptive, refer this as well while installing. 

No comments:

Post a Comment

Hi, Leave a comment here and one of the binary piper's will reply soon :)