| 1 | These instuctions are extracted from http://postgis.refractions.net/pipermail/postgis-users/2007-February/014782.html |
| 2 | |
| 3 | The standard win32 installer of PostgreSQL fails on its own. There are |
| 4 | a some tricks needed to get through the new security measures in |
| 5 | Vista, but it can be done, and in the end it works fine. Here's how: |
| 6 | |
| 7 | 1. Turn off the Windows Vista User Account Contral (UAC). This is done |
| 8 | from Users in the Control Panel. |
| 9 | |
| 10 | 2. Enable the Vista 'Administrator' user account. By default it is disabled. |
| 11 | - In the Start Menu, right click on Computer, select Manage |
| 12 | - In System Tools / Local Users and Groups / Users, open the |
| 13 | properties of the Administrator account and enable it. You will have |
| 14 | to assign a new password to the account. Installation will not work |
| 15 | from a regular account with administrator rights, it must be this |
| 16 | master Administrator account. |
| 17 | |
| 18 | 3. Create a new standard limited user account called postgres. Give it |
| 19 | a password. The PostgreSQL installer can not create this account in |
| 20 | Vista so do it ahead of time yourself. |
| 21 | |
| 22 | 4. Login to the new Administrator account. |
| 23 | |
| 24 | 5. Install PostgreSQL from the windows msi installer file. Remember to |
| 25 | not install PostGIS at this point, you'll want the more upto date |
| 26 | version than wha tthe installer has. |
| 27 | - It will ask for the postgres username and password you created in step 3. |
| 28 | - Install as a Service |
| 29 | - DO NOT select to have the installer initialize a new database. It |
| 30 | will not work. postgres.exe protects you by not running when it has |
| 31 | administrator rights, if you try to have the installer initialize a |
| 32 | new database you will get an 'initdb failed' error message and the |
| 33 | installation will rollback. If you dig deeper it will tell you that |
| 34 | initdb can not find the postgres application even though it is present |
| 35 | in the bin directory. It is there, it just won't run. |
| 36 | |
| 37 | 6. When the installer has finished successfully, logout of windows. |
| 38 | Log back in as the postgres user. |
| 39 | |
| 40 | 7. Open a command prompt, this is found in Accessories in the start |
| 41 | menue / All Programs. |
| 42 | |
| 43 | 8. Initialize a postgresql database. |
| 44 | - change to the C:\Program Files\PostgreSQL\8.2\bin directory |
| 45 | - run a command something like: |
| 46 | initdb -D "C:\Program FIles\PostgreSQL\8.2\data" -U postgres -E UTF8 |
| 47 | |
| 48 | 9. You should now have a working installation of PostgreSQL. Install |
| 49 | PostGIS using the appropriate installer from www.refractions.net. |
| 50 | Remember to get the installer that is made for your version of |
| 51 | PostgreSQL. |
| 52 | |
| 53 | 10. Disable the Administrator account and turn UAC back on. |
| 54 | |
| 55 | 11. Profit!! |