This page in other versions: 9.1 / 9.2 / 9.3 / 9.4 / current (9.5)  |  Development versions: devel  |  Unsupported versions: 7.1 / 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4 / 9.0

Chapter 1. Installation Instructions

This chapter describes the installation of PostgreSQL from the source code distribution.

1.1. Short Version

gmake install
adduser postgres
mkdir /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/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

The long version is the rest of this chapter.


Oct. 1, 2003, 3:36 p.m.

When compiling on Solaris make sure that you have set your LD_LIBRARY_PATH. In the doc directory there is a FAQ_Solaris that specifies that your LD_LIBRARY_PATH may need to be set, so make sure that you set it to something like:

I was able to successfully compile 7.3.2 on Solaris 9 using the following link as a guide:

July 16, 2004, 10:07 p.m.


i had the same problem with
*** Could not execute a simple test program. This may be a problem

After all I figured out. I had in /usr/local/lib an old* file.
And I had a newer ones in /lib directory.

After I made shure that in the /lib directory is sooner in appearance then the /usr/local/lib and run ldconfig everything was fine.

Hope this helps for others aswell. So \'locate /usr/lib/\' and see if this is the problem for yourselfs.


Oct. 24, 2004, 6:21 a.m.

Try to create user with home directory, like this

useradd -d /export/home/postgres -s /bin/bash -m postgres
passwd postgres

April 10, 2006, 4:52 p.m.

I had a lot of trouble installing postgres on a open suse 10.0 box.

(1) readline error
-> fixed by installing readline-devel rpm, found at

(2) zlib error
-> fixed by installing zlib-devel rpm, found at

(3) "Could not execute a simple test program"
-> fixed by adding the path under which the recently installed readline library can be found to the /etc/ file, in my case it was "/lib" and very important that it is mentioned before /usr/local/lib

I'm a very newbie to this linux stuff, but I kinda get to like it ;-)

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group