0% found this document useful (0 votes)
105 views3 pages

Spacewalk

Download as txt, pdf, or txt
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 3

{

prereq
at least 20 GB and recommend 80GB hard drive space
oracle java
install oracle java with following steps
alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_51/bin/java 2
[root@spacewalk ~]# alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/jdk1.7.0_51/bin/java
Enter to keep the current selection[+], or type selection number: 2
for reference
http://wiki.comdivision.com/display/cdconstech/Switch+Java+on+CentOS
}
wget http://yum.spacewalkproject.org/2.0/RHEL/5/i386/spacewalk-repo-2.0-3.el5.no
arch.rpm
rpm -Uvh spacewalk-repo-2.0-3.el5.noarch.rpm
vi /etc/yum.repos.d/jpackage-generic.repo
{
add following
[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
}
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
yum install postgresql-server spacewalk-postgresql
yum install -y 'postgresql-server > 8.4'
chkconfig postgresql on
service postgresql initdb
service postgresql start
{
configure postgresql
su - postgres -c 'PGPASSWORD=nokia420; createdb spaceschema ; createlang plpgsql
spaceschema ; yes $PGPASSWORD | createuser -P -sDR admin'
edit the file /var/lib/pgsql/data/pg_hba.conf
add following lines
local spaceschema admin md5
host spaceschema admin 127.0.0.1/8 md5
host spaceschema admin ::1/128 md5
local spaceschema postgres ident
}
service postgresql reload/restart
{
test the connection.
PGPASSWORD=nokia420 psql -a -U admin spaceschema
PGPASSWORD=nokia420 psql -h localhost -a -U admin spaceschema
}
{
tune database
yum install pgtune
pgtune --type=web -c 600 -i /var/lib/pgsql/data/postgresql.conf >/tmp/pgtune.con
f
diff -u /var/lib/pgsql/data/postgresql.conf /tmp/pgtune.conf
cp /var/lib/pgsql/data/postgresql.conf /var/lib/pgsql/data/postgresql.conf.bak
cp /tmp/pgtune.conf /var/lib/pgsql/data/postgresql.conf
service postgresql restart
}
{
yum install spacewalk-postgresql xml-commons-apis
}
{
spacewalk-setup --disconnected --external
** Database: Setting up database connection for PostgreSQL backend.
Hostname (leave empty for local)?
Database? spaceschema
Username? admin
Password?
** Database: Populating database.
*** Progress: ######
Note: just if this process gets exist with this error (Could not populate databa
se.)
then check the logs in /var/log/rhn/populate_db.log.*
if the errors says
psql:/etc/sysconfig/rhn/postgres/deploy.sql:14681: ERROR: language "" does not
exist
HINT: Use CREATE LANGUAGE to load the language into the database.
then execute following command and rerun spacewalk-setup again
su - postgres -c 'createlang pltclu spaceschema ;'
spacewalk-setup --disconnected --external
}

You might also like