Opened 13 years ago
Closed 9 years ago
#1597 closed enhancement (wontfix)
Unattended/Silent postgis installation
Reported by: | kmq | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | build | Version: | 2.0.x |
Keywords: | Cc: |
Description
I changed the postgis nsis installer script to support the /S switch which enables silent installations. Basically all MessageBoxes get default values and the switches
- /USERNAME=<username>
- /PASSWORD=<password>
- /PORT=<port>
- /DATABASE=<database>
get read from the command line.
Attached is a patch against postgis.nsi as found in http://pgfoundry.org/frs/download.php/3146/postgis-pg84-1.5.3-installersrc.zip
Is there a chance that this can get included in the official installer ?
Attachments (1)
Change History (15)
by , 13 years ago
Attachment: | postgis_silent.nsi added |
---|
comment:1 by , 13 years ago
Component: | postgis → build/upgrade/install |
---|---|
Owner: | changed from | to
Type: | defect → enhancement |
comment:2 by , 13 years ago
Owner: | changed from | to
---|
comment:3 by , 13 years ago
comment:4 by , 13 years ago
Yes? I asked him to put it here. Was planning to incorporate on my next release, but Hmm forgot about it for 2.0.0 oh well.
Keep it open. I'll get to it in a week or so and close out once I've tested on my local.
comment:5 by , 13 years ago
kmq - I'm not having any luck patching my nsi file with this git patch. Can you just send me the full .nsi file.
Thanks, Regina
comment:6 by , 13 years ago
nevermind. I think I just had to remove the email headers. Seems to have patched something.
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Okay seems to still compile so that's good. I'll cut in the changes on all the 1.5.4 and do a silent test install.
comment:8 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
/DATABASE parameter has no effect. None database is created.
comment:9 by , 12 years ago
What environment did you try that in ? Can you post your full commandline and any other details like the user postgres is run as, the user that issued the command and so on ?
comment:10 by , 12 years ago
yecarillo,
Can you also let us know which installer you are using. It's now packaged with the 1.5.4+, 2.0.1 versions I think. I forget if I have it in 2.0.0 or not. I might not.
comment:11 by , 12 years ago
Milestone: | PostGIS 1.5.4 → PostGIS Future |
---|---|
Version: | 1.5.X → 2.0.x |
Environment: Windows 7 Professional Using NSIS Unicode for making installer
File: postgis-pg92-setup-2.0.1-1.exe
Code snipped:
... RequestExecutionLevel admin ... ;copiar los archivos de PostGIS Section 'PostGIS: Motor Espacial de Base de datos' SectionIn 1 DetailPrint 'Sección 3 - Motor Espacial de Base de Datos PostGIS a $INSTDIR${POSTGRES_DIR}' DetailPrint ' instalando el motor espacial de base de datos PostGIS ${POSTGRES_VER} a $INSTDIR${POSTGRES_DIR}...' ;http://trac.osgeo.org/postgis/ticket/1597 SetOutPath '$TEMP' ExecWait 'postgis-pg92-setup-${POSTGIS_VER}.exe /S /USERNAME=postgres /PASSWORD=postgres /PORT=${POSTGRES_PORT} /DATABASE=mafe' $0 ;sleep 30000 DetailPrint ' la instalación de PostGIS ${POSTGIS_VER} devolvió $0' SectionEnd
PostGIS is successfully installed and template database is created. But, spatial database from /DATABASE isn´t created.
This the code what I put to create it, but is supposed /DATABASE do that:
... RequestExecutionLevel admin ... ;copiar los archivos de PostGIS Section 'PostGIS: Motor Espacial de Base de datos' SectionIn 1 DetailPrint 'Sección 3 - Motor Espacial de Base de Datos PostGIS a $INSTDIR${POSTGRES_DIR}' DetailPrint ' instalando el motor espacial de base de datos PostGIS ${POSTGRES_VER} a $INSTDIR${POSTGRES_DIR}...' ;http://trac.osgeo.org/postgis/ticket/1597 SetOutPath '$TEMP' ExecWait 'postgis-pg92-setup-${POSTGIS_VER}.exe /S /USERNAME=postgres /PASSWORD=postgres /PORT=${POSTGRES_PORT}' $0 ;sleep 30000 DetailPrint ' la instalación de PostGIS ${POSTGIS_VER} devolvió $0' ;Crear la base de datos de mafe DetailPrint ' creando la base de datos mafe...' ExecWait '$INSTDIR${POSTGRES_DIR}\bin\createdb.exe -h "127.0.0.1" -p "${POSTGRES_PORT}" -U "postgres" -T "template_postgis_20" --owner "postgres" mafe' SectionEnd
comment:12 by , 11 years ago
Milestone: | PostGIS Future → PostGIS 2.2.0 |
---|
comment:13 by , 11 years ago
Note as of 2.1 I am no longer creating template database. However I did leave in the sample database option. I think the issue is that for silen install, its turned off. I think I need to add another option to silent install for YES/NO to create the sample database.
comment:14 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
robe?