谁告诉我为什么我装好了PGSQL,启动Postmaster时出错啊?

yaoyouyou 2005-06-13 07:18:55
[root@localhost pgsql]# chown -R postgres.postgres /usr/local/pgsql
[root@localhost pgsql]# su postgres
[postgres@localhost pgsql]$ mkdir
mkdir: 参数太少
请尝试执行‘mkdir --help’来获取更多信息。
[postgres@localhost pgsql]$ mkdir data
[postgres@localhost pgsql]$ initdb -D /usr/local/pgsql/data
bash: initdb: command not found
[postgres@localhost pgsql]$ ./initdb -D /usr/local/pgsql/data
bash: ./initdb: 没有那个文件或目录
[postgres@localhost pgsql]$ cd bin
[postgres@localhost bin]$ ./initdb -D /usr/local/pgsql/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 zh_CN.GB18030.
This locale setting will prevent the use of indexes for pattern matching
operations. If that is a concern, rerun initdb with the collation order
set to "C". For more information see the Administrator's Guide.

Fixing permissions on existing directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... 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_clog... ok
creating template1 database in /usr/local/pgsql/data/base/1... ok
creating configuration files... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
vacuuming database template1... ok
copying template1 to template0... ok

Success. You can now start the database server using:

./postmaster -D /usr/local/pgsql/data
or
./pg_ctl -D /usr/local/pgsql/data -l logfile start

[postgres@localhost bin]$ ./postmaster -i -D /usr/local/pgsql/data
LOG: StreamServerPort: bind() failed: 地址已在使用
Is another postmaster already running on port 5432?
If not, wait a few seconds and retry.
./postmaster: cannot create INET stream port

[postgres@localhost bin]$ ./postmaster -i -p 666 -D /usr/local/pgsql/data
LOG: StreamServerPort: bind() failed: 权限不够
Is another postmaster already running on port 666?
If not, wait a few seconds and retry.
./postmaster: cannot create INET stream port

[postgres@localhost bin]$ ./createdb test
psql: FATAL: 无法打开 /usr/local/pgsql/data/global/1262: 权限不够
createdb: database creation failed


我原来是装了postgreSql的rpm包的,后来卸载rpm包,用源码编译安装的pgsql。
inidb 以后,就不能启动了?为什么呢?

请高手帮忙,随风老大在不?
...全文
862 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
dddbryant 2005-06-14
  • 打赏
  • 举报
回复
俺是来接分的:)
yaoyouyou 2005-06-13
  • 打赏
  • 举报
回复
哈哈,原来重启以后就可以了。
不知什么原因

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧