Thursday, December 14, 2006

How to install postgres 8.2 on slackware 11

Took me sometime to figure out postgres 8.2 installation on slackware 11
Here is how:
Grep a source copy of postgres from http://www.postgresql.org,

./configure
gmake
su
gmake install
adduser postgres
chown postgres /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test


riped form http://www.postgresql.org/docs/8.2/interactive/install-short.html

An easy way is to download postgres package from http://www.linuxpackages.net,
installpkg postgres_xx.tgz

Sometimes you get error message like "fatal: role 'insistkool' does not exist", do:
$su
$createuser -U postgres
Enter name of role to add: insistkool
Shall the new role be a superuser? (y/n) y

$initdb -D ~/data
$postmaster -D ~/data
psql insistkool

Metasploit 3 needs postgres database to perform auto exploitation, so it is highly recommended to install postgres on your machine for testing

2 comments:

yanamandra said...

Thanks so much!. that was really helpful. I was very much suffering from the shared library problems with the installer version of postgres that I downloaded from postgres.org. The idea of configuring the make and make install worked really cool.
BTW, I got PostgresSQL 8.4.0 on Slackware Linux 12.2 up and running!

You are the best!

Anonymous said...

I was trying all day to install it!Thank you very much...