Postgresql 9.4.0 Win7 x64 decompression version installation steps

Source: Internet
Author: User

First, download unzip

1, download postgresql-9.4.0-1-windows-x64-binaries.zip

2, unzip postgresql-9.4.0-1-windows-x64-binaries.zip to E: \

Second, add users

1, add windows Span style= "font-family: Arial" > user, used to start postgresql windows
net user  postgres pgsqlpw /add /expires:never /passwordchg:no

2, for security, this user is not allowed to log on locally
net localgroup users postgres /del

3, is assigned to windows Span style= "font-family: Arial" > user postgres Access postgresql permissions for the installation directory
CACLS .  /t /e /p postgres:r

Third, initialize the database

1, switch to windows user postgres command-line environment
D:\PGSQL>RUNAS /NOPROFILE /ENV /USER:POSTGRES    cmd  

Note: With the Administrator account, the postgres account initialization, change the password on it.

2, initialize the database , If you do not use -u admin, The database automatically add the current Windows user ( i.e. postgres) is a database account
initdb.exe-d E:\postgresql-9.4.0-1-windows-x64\data-E UTF-8--locale=chs

3, start database
pg_ctl.exe -d e:\postgresql-9.4.0-1-windows-x64\data -l logfile  Start

4, Stop the database
Pg_ctl.exe-d E:\postgresql-9.4.0-1-windows-x64\data Stop

Iv. registering as a Windows service

1, registered as a Windows service , the current windows user ( IE postgres) will act as a login user for the PostgreSQL service
   Pg_ctl.exe register-d E:\postgresql-9.4.0-1-windows-x64\data-NPostgreSQL

2. start the PostgreSQL service
net start PostgreSQL  

Postgresql 9.4.0 Win7 x64 decompression installation steps

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.