postgre--install Postgre Database under Windows __ Database

Source: Internet
Author: User
Tags postgresql

First go to http://www.postgresql.org/ftp/binary/v8.2.4/win32/download Postgresql-8.2.4-1.zip.

Install Postgresql-8.2.msi after decompression

Note: I have tried 8.3.1 version, the following method is not good, the hint does not support GBK encoding, time relationship I did not further study.

During installation, do not select when a check box appears install as Aservice (otherwise it will let you create the user ...). Anyhow trouble, easy to make mistakes), Next on line, install complete.

The reason for not selecting install as Aservice:

If installed into a service, you need to have an NTFS partition on your machine (installed into a service can be used as a system of services, as a system for the implementation of a background application process is more convenient) otherwise the installation can not be successful, will be an error, if you do not have NTFS partitions on the machine, You can refer to the following steps for installation (the service can also be installed later):

1. Install the first time do not choose to install the service, only install software, assuming to C:/pgsql
2. Create a user without administrator privileges, such as Postgres, set a password, such as 1234

Start-> Settings-> Control Panel-> user account-> Create a new account


3. To administrators, such as administrator login, open the console, referred to as console A


4. Run runas/user:postgres cmd in console A, open a console that executes as a postgres user, referred to as the console P


5. Run c:/pgsql/bin/initdb-d D:/pg_data initialize the database cluster on the console P


6. Implementation of C:/pgsql/bin/pg_ctl Register-n postgresql-u posgres-p 1234-d d:/pg_data Registration service in console A


7. Start PostgreSQL in the Control Panel--> management tool--> Service


It may fail to start because the user created Postgres does not have the right to log on as a service, open the Properties window of the PostgreSQL service, and reset password 1234.

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.