R7AF
asked on
Postgresql 8.4 on Ubuntu - PG_VERSION is missing
I want to get PostgreSQL 8.4 running on Ubuntu 10.10 (64bit desktop). I've installed postgres via Synaptic, tried to get it configured, but I can't get it working.
When I run this command:
./pg_ctl start -D /usr/share/postgresql/8.4/ DATA
I get this error message:
FATAL: "/usr/share/postgresql/8.4 /DATA" is not a valid data directory
DETAIL: File "/usr/share/postgresql/8.4 /DATA/PG_V ERSION" is missing.
The directory /usr/share/postgresql/8.4/ DATA exists with owner postgres, but there is no PG_VERSION file in it.
How can I get Postgres working?
When I run this command:
./pg_ctl start -D /usr/share/postgresql/8.4/
I get this error message:
FATAL: "/usr/share/postgresql/8.4
DETAIL: File "/usr/share/postgresql/8.4
The directory /usr/share/postgresql/8.4/
How can I get Postgres working?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
# as root
chkconfig postgresql on
# will set service postgresql to start automatically on reboot
# the command
service postgresql start
# will manually start the postgresql service
chkconfig postgresql on
# will set service postgresql to start automatically on reboot
# the command
service postgresql start
# will manually start the postgresql service
ASKER
I installed chkconfig and ran the command. After a restart, postgres didn't run. When I use the command "service postgresql start", nothing happens, not even a comment or error message.
Postgresql does start when I use the following command.
/usr/lib/postgresql/8.4/bi n/postgres -D /usr/share/postgresql/8.4/ DATA
Postgresql does start when I use the following command.
/usr/lib/postgresql/8.4/bi
ASKER
In /etc/rc2.d I see the following two symlinks. I thought this would make postgresql run at startup. Do I need to do something else?
lrwxrwxrwx 1 root root 20 2010-10-14 12:59 S19postgresql -> ../init.d/postgresql
lrwxrwxrwx 1 root root 24 2010-05-25 16:42 S19postgresql-8.4 -> ../init.d/postgresql-8.4