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 http://spacewalk.redhat.com/yum/1.5/RHEL/6/x86_64/spacewalk-repo-1.5-1.el6.noarch.rpm
 rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
 rpm -ihv http://spacewalk.redhat.com/yum/1.5-client/RHEL/6/x86_64/spacewalk-client-repo-1.5-1.el6.noarch.rpm
 
# Get your GPG keys for redhat 
 
 yum install -y wget
 wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release http://www.redhat.com/security/37017186.txt
 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 
 
 [jpackage-generic]
 name=JPackage generic
 baseurl=http://mirrors.dotsrc.org/jpackage/5.0/generic/free/
 enabled=1
 gpgcheck=1
 gpgkey=http://www.jpackage.org/jpackage.asc
 EOF
 
# 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
 
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
 local   spaceschema     spaceuser                       md5
 host    spaceschema     spaceuser       127.0.0.1/8     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
 wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/selinux-policy-3.7.19-93.el6.src.rpm
 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 :)