I'm trying to install PostgreSQL server on a server running debian8.
I installed the package postgresql-9.5
with apt, but it seems like there are missing programs.
I tried to create a cluster but initdb
can not be found on the server, I tried as standard user, as postgres
and even root
.
When I look up /usr/lib/postgresql/9.5/bin/
there is not initdb
nor pg_ctl
program.
Is there any additionnal package I forgot to install to make it work ?
initdb
is part of thepostgresql-9.5
package as provided by pgdg, and it should be located where you don't find it.It's not normal if you don't find
initdb
in the directory where it should be, so you might want to double check that, and maybe consider reinstalling the package.But anyway
initdb
is not meant to be called directly in Debian, which is why it's not in the PATH. Debian packages for postgres come with an abstraction layer on top of all these commands, to allow for several versions of postgres to run simultaneously.There is an introduction here: https://wiki.debian.org/PostgreSql and details in the manpages for pg_wrapper, pg_ctlcluster, pg_createcluster, ... and a few other pg_* commands.
Also, a default cluster is automatically created when the main postgresql package is installed, so you normally don't even have to create one, and a default database is accessible just after the install by running
psql
under thepostgres
account.