Binary installation steps:
Groupadd Postgres
Useradd-g Postgres Postgres
ID Postgres
passwd Postgres
Mkdir-p/data/postgresql/data
Mkdir-p/data/postgresql/log
Tar XF postgresql-9.5.9-1-linux-x64-binaries.tar.gz-c/usr/local/
cd/usr/local/
Chown-r Postgres.postgres Pgsql
Cd/data
Chown-r Postgres.postgres PostgreSQL
cd/usr/local/pgsql/bin/
Vim/etc/profile
Source/etc/profile
Normal User start PostgreSQL service
Su-postgres
Initialize the database:
INITDB-E utf8-d/data/postgresql/data
Start the database:
pg_ctl-d/data/postgresql/data-l/data/postgresql/log/postgres.log Start
[Email protected] log]# Tailf/data/postgresql/log/postgres.log
Log:could not create IPv6 socket:address family not supported by protocol
Log:database system was shut down at 2017-10-04 18:06:18 CST
Log:multixact member wraparound protections is now enabled
Log:database system is ready to accept connections
Log:autovacuum Launcher started
Turn off the PostgreSQL service
pg_ctl-d/data/postgresql/data-l/data/postgresql/log/postgres.log Stop
[Email protected] log]# Tailf/data/postgresql/log/postgres.log
Log:received Fast Shutdown Request
Log:aborting any active transactions
Log:autovacuum Launcher shutting down
Log:shutting down
Log:database system is shut down
Restarting the PostgreSQL service
pg_ctl-d/data/postgresql/data-l/data/postgresql/log/postgres.log Restart
[Email protected] log]# Tailf/data/postgresql/log/postgres.log
Log:received Fast Shutdown Request
Log:aborting any active transactions
Log:autovacuum Launcher shutting down
Log:autovacuum Launcher shutting down
Log:shutting down
Log:database system is shut down
Log:could not create IPv6 socket:address family not supported by protocol
Log:database system was shut down at 2017-10-04 18:08:15 CST
Log:multixact member wraparound protections is now enabled
Log:database system is ready to accept connections
Log:autovacuum Launcher started
To view the boot log:
Tail-100f/data/postgresql/log/postgres.log
Ps-ef
Login database:
Psql
The default login PostgreSQL database does not require a password
This article is from the "10931853" blog, please be sure to keep this source http://wujianwei.blog.51cto.com/10931853/1970386
PostgreSQL Binary Quick Install