谁告诉我为什么我装好了PGSQL,启动Postmaster时出错啊?
[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 以后,就不能启动了?为什么呢?
请高手帮忙,随风老大在不?
[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 以后,就不能启动了?为什么呢?
请高手帮忙,随风老大在不?
...全文
相关推荐
Linux下PostgreSQL安装与开机启动
Linux下PostgreSQL安装与开机启动
linux配置postgresql
linux环境下配置postgresql数据库。
postgreSQL在Linux部署文档
超详细的postgreSQL在Linux部署文档postgreSQL在Linux部署文档postgreSQL在Linux部署文档
Ubuntu 16.04设置PostgreSQL开机启动的方法
由于PostgreSQL是编译安装的,需要设置开机启动。这篇文章主要介绍了Ubuntu 16.04设置PostgreSQL开机启动的方法,需要的朋友可以参考下
Linux操作手册Linux操作手册
Linux操作手册Linux操作手册Linux操作手册Linux操作手册


