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

yaoyouyou yaoyouyou 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
[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 以后,就不能启动了?为什么呢?

请高手帮忙,随风老大在不?
...全文
评论 2
收藏 已收藏
分享
返回顶部
yaoyouyou
MySQL 57,063 成员 56,760 内容