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