当试图启动PostgreSQL时,我得到这个'空'的错误信息:
root@mountain-lion:/home/ubuntu# service postgresql start * Starting PostgreSQL 9.1 database server * Error: could not exec /usr/lib/postgresql/9.1/bin/pg_ctl /usr/lib/postgresql/9.1/bin/pg_ctl start -D /vol/postgres -l /var/log/postgresql/postgresql-9.1-main.log -s -o -c config_file="/etc/postgresql/9.1/main/postgresql.conf" :
这是一个新安装的Ubuntu 11.10服务器(在EC2 / Scalarium上), postgresql-9.1只是通过apt-get安装。
postgresql.conf中有一个更改configuration值:
data_directory = '/vol/postgres'
/vol/postgres看起来像这样
drwx------ 5 postgres postgres 38 2012-05-18 15:13 base drwx------ 2 postgres postgres 4096 2012-05-18 15:13 global drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_clog drwx------ 4 postgres postgres 34 2012-05-18 15:12 pg_multixact drwx------ 2 postgres postgres 17 2012-05-18 15:13 pg_notify drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_serial drwx------ 2 postgres postgres 24 2012-05-18 15:13 pg_stat_tmp drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_subtrans drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_tblspc drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_twophase -rw------- 1 postgres postgres 4 2012-05-18 15:12 PG_VERSION drwx------ 3 postgres postgres 58 2012-05-18 15:12 pg_xlog -rw------- 1 postgres postgres 133 2012-05-18 15:13 postmaster.opts lrwxrwxrwx 1 root root 36 2012-05-18 15:13 server.crt -> /etc/ssl/certs/ssl-cert-snakeoil.pem lrwxrwxrwx 1 root root 38 2012-05-18 15:13 server.key -> /etc/ssl/private/ssl-cert-snakeoil.key
任何想法?
更新 :当我将data_directory为默认( /var/lib/postgresql/9.1/main )时,它可以正常工作,所以在特定的更改中肯定会出现错误。
固定。 首先,我将/vol/postgres的所有者更改为postgres (在对问题的评论之后)。 这导致了以下可以理解的错误:
* The PostgreSQL server failed to start. Please check the log output: 2012-05-25 07:50:13 GMT FATAL: data directory "/vol/postgres" has group or world access 2012-05-25 07:50:13 GMT DETAIL: Permissions should be u=rwx (0700).
所以我做了它所说的,现在就开始了。