[highgo@db1 1]$ pg_ctl initdb -s -D /data/highgo/4.1.0/1/
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
[highgo@db1 1]$ rm -rf *
[highgo@db1 1]$ pg_ctl initdb -D /data/highgo/4.1.0/1/
The files belonging to this database system will be owned by user "highgo".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
Data encryption is disabled.
fixing permissions on existing directory /data/highgo/4.1.0/1 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /data/highgo/4.1.0/1/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to highgo ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/data/highgo/4.1.0/bin/pg_ctl -D /data/highgo/4.1.0/1 -l logfile start
[highgo@db1 1]$
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
[highgo@db1 1]$ rm -rf *
[highgo@db1 1]$ pg_ctl initdb -D /data/highgo/4.1.0/1/
The files belonging to this database system will be owned by user "highgo".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
Data encryption is disabled.
fixing permissions on existing directory /data/highgo/4.1.0/1 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /data/highgo/4.1.0/1/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to highgo ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/data/highgo/4.1.0/bin/pg_ctl -D /data/highgo/4.1.0/1 -l logfile start
[highgo@db1 1]$

本文展示了如何使用`initdb -s`参数初始化PostgreSQL数据库,该参数仅输出错误日志和警告信息。过程中提到了权限设置、默认配置选择以及成功启动数据库的指令。
655

被折叠的 条评论
为什么被折叠?



