Ubuntu 10.4 上的 postgresql 不会在启动时启动

viv*_*vri 6 postgresql init.d ubuntu-10.04 rc.local

我正在尝试在 Ubuntu 服务器 10.04(64 位)上启动 postgresql 8.4。

首先,我尝试将:su -c 'pg_ctl start -D /home/postgres -l /home/postgres/serverlog' --preserve-environment postgres 放在 的末尾init.d/rc.local,但无济于事。服务器日志文件甚至不在系统上。

然后我尝试运行update-rc.d postgresql-8.4 defaults,它喷出:

System start/stop links for /etc/init.d/postgresql-8.4 already exist.

一条相关信息是,通过在su -c 'pg_ctl start -D /home/postgres -l /home/postgres/serverlog' --preserve-environment postgres 没有 --preserve-environment 标志的情况下以 root 身份运行,它无法识别 pg_ctl。否则,服务启动,我可以连接到数据库。但即使保留了环境,服务在 init 文件中运行时也不会启动。

有什么线索吗?谢谢!维克。

小智 1

chkconfig postgresql报告什么?您应该能够chkconfig postgresql on在 ubuntu 中以 root 身份打开它。请参阅http://manpages.ubuntu.com/manpages/lucid/man8/chkconfig.8.html