Changes between Version 36 and Version 37 of UsersWikiWinCompileInitdb
- Timestamp:
- 12/09/09 10:17:34 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiWinCompileInitdb
v36 v37 1 1 = Initialize PostgreSQL cluster and run as server for compiled version = 2 2 3 '''This is still a work in progress ''' [UsersWikiWinCompile Back to windows compile]3 '''This is still a work in progress ''' ([UsersWikiWinCompile Back to windows compile]) 4 4 5 5 6 1. Create a windows local user called postgres6 1. '''Create a Windows local user''' called "postgres". 7 7 8 2. Initialize the DB cluster from the Msys shell:[[BR]][[BR]] /c/postgres/bin/initdb -U postgres -D /c/postgres/data -A trust8 2. '''Initialize the DB cluster''' from the Msys shell: 9 9 10 3. You may want to change the port in the C:/postgres/data/posgresql.conf file (in our case running under 8433 not to conflict with our regular postgres install)10 /c/postgres/bin/initdb -U postgres -D /c/postgres/data -A trust 11 11 12 4. Install as service: (From DOS not MinGW) -- note that in this case postgres is a windows account so use the password you specified for the windows account.[[BR]][[BR]] "c:\postgres\bin\pg_ctl" register -N "pgsql-8.3 test" -D "C:\postgres\data" -U postgres -P "somepassword"12 3. You may want to '''change the port''' in the C:/postgres/data/posgresql.conf file (in our case running under 8433 not to conflict with our regular postgres install) 13 13 14 5. Go into the Services panel under windows and start the PostgreSQL service[[BR]][[BR]]15 a. If your service does not start - check the Windows Event Viewer[[BR]][[BR]]16 a. You can uninstall the service with:[[BR]][[BR]] "c:\postgres\bin\pg_ctl" unregister -N "pgsql-8.3 test" (this requires a restart)[[BR]][[BR]]A faster way is to stop the service and then from dos:[[BR]][[BR]]sc delete "pgsql-8.3 test"14 4. '''Start PostgreSQL''' following one of those two options: 15 16 '''Option A) As a Windows service:''' 17 17 18 6. Before you do a make check for PostGIS, make sure to do an export of PGPORT and other variable to point to the one you are testing (you do this in Msys) 18 1) Install the service: (from a DOS shell not MinGW) (Note that in this case postgres is a windows account so use the password you specified for the windows account.) 19 20 "c:\postgres\bin\pg_ctl" register -N "pgsql-8.4 test" -D "C:\postgres\data" -U postgres -P "somepassword" 21 22 2) Start the "pgsql-8.4 test" Services from "Configuration Panels->Administration Tools->Services" 23 24 If the service does not start, check the Windows Event Viewer for meaningfull error message 25 26 3) You can uninstall the service with: 27 28 "c:\postgres\bin\pg_ctl" unregister -N "pgsql-8.3 test" 29 30 This requires a restart. A faster way is to stop the service and then from dos: 31 32 sc delete "pgsql-8.3 test" 33 34 '''Option B) Directly from the DOS shell:''' 35 36 1) In the same shell where you Initialized the DB cluster, do: 37 38 "c:\postgres\bin\pg_ctl" -o "-p 5433" start -D C:\postgres\data 39 40 2) You can stop the server with: 41 42 "c:\postgres\bin\pg_ctl" stop -D C:\postgres\data 43 44 45 5. Before you do a make check for PostGIS, make sure to do an export of PGPORT and other variable to point to the one you are testing (you do this in Msys) 19 46 http://www.postgresql.org/docs/8.3/interactive/libpq-envars.html 20 47