# uname -a
Linux localhost 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 GNU/Linux# cat /etc/debian_version
6.0.2
# apt-get install postgresql-8.4 postgresql-client-common postgresql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
postgresql-client-8.4
Suggested packages:
oidentd ident-server postgresql-doc-8.4
The following NEW packages will be installed:
postgresql-8.4 postgresql-client-8.4 postgresql-client-common postgresql-common
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,996 kB of archives.
After this operation, 24.0 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Y
Get:1 http://ftp.debian.org/debian/ squeeze/main postgresql-client-common all 113 [56.9 kB]
Get:2 http://ftp.debian.org/debian/ squeeze-updates/main postgresql-client-8.4 amd64 8.4.8-0squeeze2 [1,473 kB]
Get:3 http://ftp.debian.org/debian/ squeeze/main postgresql-common all 113 [127 kB]
Get:4 http://ftp.debian.org/debian/ squeeze-updates/main postgresql-8.4 amd64 8.4.8-0squeeze2 [5,339 kB]
Fetched 6,996 kB in 2s (3,323 kB/s)
Preconfiguring packages ...
Selecting previously deselected package postgresql-client-common.
(Reading database ... 141698 files and directories currently installed.)
Unpacking postgresql-client-common (from .../postgresql-client-common_113_all.deb) ...
Selecting previously deselected package postgresql-client-8.4.
Unpacking postgresql-client-8.4 (from .../postgresql-client-8.4_8.4.8-0squeeze2_amd64.deb) ...
Selecting previously deselected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_113_all.deb) ...
Selecting previously deselected package postgresql-8.4.
Unpacking postgresql-8.4 (from .../postgresql-8.4_8.4.8-0squeeze2_amd64.deb) ...
Processing triggers for man-db ...
Setting up postgresql-client-common (113) ...
Setting up postgresql-client-8.4 (8.4.8-0squeeze2) ...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode.
Setting up postgresql-common (113) …
Setting up postgresql-8.4 (8.4.8-0squeeze2) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
fgets failure: Success
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/lib/postgresql/8.4/bin/initdb".
Check your installation.
Error: initdb failed
Error: could not create default cluster. Please create it manually with
pg_createcluster 8.4 main --start
or a similar command (see 'man pg_createcluster').
update-alternatives: using /usr/share/postgresql/8.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
# pg_createcluster 8.4 main --start
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
fgets failure: Success
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/lib/postgresql/8.4/bin/initdb".
Check your installation.
Error: initdb failed
# ls -la /usr/lib/postgresql/8.4/bin/
total 6260
-rwxr-xr-x 1 root root 59800 Jun 29 23:56 clusterdb
-rwxr-xr-x 1 root root 59864 Jun 29 23:56 createdb
-rwxr-xr-x 1 root root 55520 Jun 29 23:56 createlang
-rwxr-xr-x 1 root root 64248 Jun 29 23:56 createuser
-rwxr-xr-x 1 root root 59672 Jun 29 23:56 dropdb
-rwxr-xr-x 1 root root 55520 Jun 29 23:56 droplang
-rwxr-xr-x 1 root root 59672 Jun 29 23:56 dropuser
-rwxr-xr-x 1 root root 79568 Jun 29 23:56 initdb
-rwxr-xr-x 1 root root 26544 Jun 29 23:56 pg_controldata
-rwxr-xr-x 1 root root 35072 Jun 29 23:56 pg_ctl
-rwxr-xr-x 1 root root 285944 Jun 29 23:56 pg_dump
-rwxr-xr-x 1 root root 80888 Jun 29 23:56 pg_dumpall
-rwxr-xr-x 1 root root 30640 Jun 29 23:56 pg_resetxlog
-rwxr-xr-x 1 root root 129032 Jun 29 23:56 pg_restore
-rwxr-xr-x 1 root root 4835568 Jun 29 23:56 postgres
lrwxrwxrwx 1 root root 8 Jul 16 16:56 postmaster -> postgres
-rwxr-xr-x 1 root root 371776 Jun 29 23:56 psql
-rwxr-xr-x 1 root root 59832 Jun 29 23:56 reindexdb
-rwxr-xr-x 1 root root 31136 Jun 29 23:56 vacuumdb