Windows manual installation of PostgreSQL 9.0 zip uncompressed version

Source: Internet
Author: User
Tags postgresql windows manual

First, download unzip

1, download Postgresql-9.0.1-1-windows-binaries.zip

2, unzip Postgresql-9.0.1-1-windows-binaries.zip to D:\

Second, add users

1. Add Windows user to start PostgreSQL Windows service
D:\pgsql>net User Postgres Pgsqlpw/add/expires:never/passwordchg:no

2, to ensure security, this user is not allowed to log on locally
d:\pgsql>net localgroup Users Postgres/del

3, assign Windows user postgres access to the PostgreSQL installation directory
D:\pgsql>cacls. /T/E/P Postgres:r

Third, initialize the database

1. Switch to the Windows user postgres command-line environment
D:\pgsql>runas/noprofile/env/user:postgres "cmd"

2, initialize the database, if you do not use-u admin, the database automatically add the current Windows user (that is, postgres) for the database account
D:\pgsql>bin\initdb.exe-d "D:/pgsql/data"-e utf-8–-locale=chs-a md5-u admin-w

3. Start the database
D:\pgsql>bin\pg_ctl.exe-d "D:/pgsql/data"-l logfile Start

4, Stop the database
D:\pgsql>bin\pg_ctl.exe-d "D:/pgsql/data" stop

Iv. registering as a Windows service

1, registered as a Windows service, the current Windows user (that is, Postgres) will be the login user for the PostgreSQL service
D:\pgsql>bin\pg_ctl register-n postgresql-d "D:\pgsql\data"

2. Start the PostgreSQL service
D:\pgsql> SC start PostgreSQL

Windows manual installation of PostgreSQL 9.0 zip uncompressed version

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.