免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7163 | 回复: 7
打印 上一主题 下一主题

执行 initdb 命令失败 [复制链接]

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-21 23:08 |只看该作者 |倒序浏览
新安装的系统,执行 initdb 命令时出现如下失败信息,何解?


scosysv:~$ export LC_ALL=C
scosysv:~$ initdb -D $HOME/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating directory /usr/local/pgsql/data/global ... ok
creating directory /usr/local/pgsql/data/pg_xlog ... ok
creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok
creating directory /usr/local/pgsql/data/pg_clog ... ok
creating directory /usr/local/pgsql/data/pg_subtrans ... ok
creating directory /usr/local/pgsql/data/pg_twophase ... ok
creating directory /usr/local/pgsql/data/pg_multixact/members ... ok
creating directory /usr/local/pgsql/data/pg_multixact/offsets ... ok
creating directory /usr/local/pgsql/data/base ... ok
creating directory /usr/local/pgsql/data/base/1 ... ok
creating directory /usr/local/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... =: is not an ide                                                                             ntifier
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/pgsql/data"



什么原因???

论坛徽章:
0
2 [报告]
发表于 2009-08-25 15:28 |只看该作者
/usr/local/pgsql/data 用户宿主

su -  postgres

[ 本帖最后由 聪明笨小孩 于 2009-8-25 15:42 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2009-08-31 08:55 |只看该作者
原帖由 聪明笨小孩 于 2009-8-25 15:28 发表
/usr/local/pgsql/data 用户宿主

su -  postgres

yes注意权限啊。。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
4 [报告]
发表于 2012-03-10 22:23 |只看该作者
回复 2# 聪明笨小孩


    是这个用户执行的。

那个 data 目录是这个用户主目录下的一个目录。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
5 [报告]
发表于 2012-03-10 22:25 |只看该作者
[postgres@scosysv ~]$ initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /usr/postgres/data ... ok
creating directory /usr/postgres/data/global ... ok
creating directory /usr/postgres/data/pg_xlog ... ok
creating directory /usr/postgres/data/pg_xlog/archive_status ... ok
creating directory /usr/postgres/data/pg_clog ... ok
creating directory /usr/postgres/data/pg_subtrans ... ok
creating directory /usr/postgres/data/pg_twophase ... ok
creating directory /usr/postgres/data/pg_multixact/members ... ok
creating directory /usr/postgres/data/pg_multixact/offsets ... ok
creating directory /usr/postgres/data/base ... ok
creating directory /usr/postgres/data/base/1 ... ok
creating directory /usr/postgres/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /usr/postgres/data/base/1 ... =: is not an identifier
child process exited with exit code 1
initdb: removing contents of data directory "/usr/postgres/data"

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
6 [报告]
发表于 2012-03-10 22:25 |只看该作者
什么原因?

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
7 [报告]
发表于 2012-03-16 15:24 |只看该作者
PG版本应该是9.x吧, 印象中我遇到这个问题

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
8 [报告]
发表于 2012-03-17 00:22 |只看该作者
回复 7# congli


    从 8.03 到 8.40 我全部试了,都是这个问题。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP