PostgreSQL Binary Quick Install

Source: Internet
Author: User
Tags postgresql

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.