Because I could not found any guide that let me properly install SpaceWalk on CentOS 6, I decided to write this article. Kuddos go to The Noc Cave with this article, for helping me most to go in the good direction.
Please leave a comment if you encounter any problems. Thank you!
For the installation of SpaceWalk on CentOS 6, I used a bare installation of CentOS.
First install the SpaceWalk repository:
rpm -Uvh http://spacewalk.redhat.com/yum/latest/RHEL/6/x86_64/spacewalk-repo-1.9-1.el6.noarch.rpm
Enable the priority plugin for yum:
yum install yum-plugin-priorities
Edit /etc/yum.repos.d/spacewalk.repo and add the following lines:
[spacewalk-latest]
name=Spacewalk-latest
baseurl=http://spacewalk.redhat.com/yum/latest/RHEL/6/x86_64/
gpgkey=http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
enabled=1
gpgcheck=1
priority=1
Install the following required additional repositories:
rpm -Uvh http://mirrors.dotsrc.org/jpackage/5.0/generic/free/RPMS/jpackage-release-5-4.jpp5.noarch.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://spacewalk.redhat.com/yum/1.7-client/RHEL/6/x86_64/spacewalk-client-repo-1.7-5.el6.noarch.rpm
Change the following line in /etc/yum.repos.d/jpackage.repo (at the bottom):
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=redhat-el-$releasever&type=free&release=5.0
to
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=redhat-el-5.0&type=free&release=5.0
Now, yum clean all
Install postgresql:
yum install postgresql postgresql-contrib postgresql-devel postgresql-server
Enable postgresql and initialize it:
chkconfig postgresql on
service postgresql initdb
service postgresql start
Create the SpaceWalk database and user:
su – postgres -c ‘PGPASSWORD=spacepw; createdb spacedb ; createlang plpgsql spacedb ; yes $PGPASSWORD | createuser -P -sDR spaceuser’
Edit /var/lib/pgsql/data/pg_hba.conf and add the following lines so it look likes this:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# local spacewalk info
local spacedb spaceuser md5
host spacedb spaceuser 127.0.0.1/8 md5
host spacedb spaceuser ::1/128 md5
local spacedb postgres ident
Reload postgresql:
service postgresql reload
Now, install SpaceWalk and get a coffee:
yum install spacewalk-postgresql
Finally we can initialize SpaceWalk now:
spacewalk-setup –disconnected –external-db
choose for local db (just enter)
database is: spacedbusername is: spaceuser
password is: spacepw
Next you will be asked for some certificate information. Supply with the (default) information needed and reboot your box.
After reboot you will have to adjust your firewall to allow access to ports 443 and 5222.
Your SpaceWalk server should now be available on: https://[box-ip-address]
At first access you’ll be asked to create a new user.
Excellent Article! Only thing I found is I have had to install the postgresql-libs as well…
Hi, Thanks for this guide!
I have installed CentOS 6.4 and spacewalk 2.0
I expect some weird problems when trying to kickstart distribution from webgui, internal 500 error. When looking in catalina.out this is the message:
2013-08-20 23:44:55,621 [RHN Message Dispatcher] ERROR com.redhat.rhn.common.messaging.ActionExecutor – com.redhat.rhn.common.messaging.MessageExecuteException: TraceBackAction can’t find localhost!
com.redhat.rhn.common.messaging.MessageExecuteException: TraceBackAction can’t find localhost!
at com.redhat.rhn.frontend.events.TraceBackAction.getSubject(TraceBackAction.java:51)
at com.redhat.rhn.frontend.events.BaseMailAction.execute(BaseMailAction.java:41)
at com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java:69)
at com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java:58)
at java.lang.Thread.run(Thread.java:679)
Any ideas are deeply appreciated.
Thanks!
Hi. Thanx for your comment! Looks to me that it can’t resolve to localhost? Are your DNS or /etc/hosts entries correct?