PostgreSQL supports the administrator to manually install the database directly, providing users with greater convenience.
1. Download the free binary package on the PostgreSQL official website with the name similar to postgresql-*.*.*.*-binaries-no-installer.tar.gz. Download it locally and unzip it to a path.
2. Create the Data folder in the path directory to hold the information.
3. Start-and-run-->cmd into the command line. and CD to the Path\bin directory, execute the following command to initialize the database:
path\bin> initdb.exe-d path\data-e UTF8--locale=c |
4. Register Pgsql as a Windows service for ease of operation and control:
path\bin> Pg_ctl.exe register-d path\data-n pgsql |
where the-n parameter is used to set Pgsql as the name of the Windows service.
5. Start and close the database at the command line:
> net start pgsql (Open database) > net stop pgsql (Close database) |
Note: In order to avoid possible later in the sub-state large character set garbled problem, unified use UTF8 encoding.
Manually installing PostgreSQL on Windows with a free-install version