AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 392267
Accepted
Bart van Heukelom
Bart van Heukelom
Asked: 2012-05-25 06:22:13 +0800 CST2012-05-25 06:22:13 +0800 CST 2012-05-25 06:22:13 +0800 CST

启动几乎默认的 PostgreSQL 时出现空错误

  • 772

尝试启动 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 中有一个更改配置值:

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) 时,它工作正常,因此该特定更改一定有问题。

ubuntu postgresql
  • 1 1 个回答
  • 2790 Views

1 个回答

  • Voted
  1. Best Answer
    Bart van Heukelom
    2012-05-25T23:53:13+08:002012-05-25T23:53:13+08:00

    固定的。/vol/postgres首先,我更改了to的所有者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).
    

    所以我按照它说的做了,现在它开始了。

    • 1

相关问题

  • 无法通过 Ubuntu VPN 访问外部网络

  • ubuntu apt-get upgrade - 如何在 shell 中单击确定?

  • VirtualBox 上 Ubuntu 的访客优化技巧 [关闭]

  • 外部硬盘上的 virtualbox 虚拟硬盘驱动器(Vista 主机上的 ubuntu 客户机)

  • 如何在 Ubuntu 上挂载 LVM 分区?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve