初期化
> /usr/local/etc/rc.d/postgresql 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".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /var/db/postgres/data10 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... 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:
/usr/local/bin/pg_ctl -D /var/db/postgres/data10 -l logfile start
起動
> /usr/local/etc/rc.d/postgresql start
2017-10-16 09:50:43.208 JST [47621] LOG: listening on IPv6 address "::1", port 5432
2017-10-16 09:50:43.209 JST [47621] LOG: listening on IPv4 address "127.0.0.1", port 5432
2017-10-16 09:50:43.210 JST [47621] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2017-10-16 09:50:43.215 JST [47621] LOG: ending log output to stderr
2017-10-16 09:50:43.215 JST [47621] HINT: Future log output will go to log destination "syslog".