User Tools

Site Tools


tecnica:gps_cartografia_gis:mapserver_oracle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tecnica:gps_cartografia_gis:mapserver_oracle [2011/12/01 17:02] – [Compilazione MapServer] niccolotecnica:gps_cartografia_gis:mapserver_oracle [2011/12/06 13:08] (current) – [Compilazione MapServer] niccolo
Line 28: Line 28:
 ...</file> ...</file>
   - Ricompilare con <code>dpkg-buildpackage -rfakeroot</code>   - Ricompilare con <code>dpkg-buildpackage -rfakeroot</code>
 +
 +Verificare che il supporto sia incluso nell'eseguibile (''INPUT=ORACLESPATIAL''), ad esempio:
 +
 +<code>
 +# ./mapserv -v
 +MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF
 +OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
 +SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
 +SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
 +SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL
 +INPUT=SHAPEFILE
 +</code>
 +
 +L'eseguibile linka dinamicamente le seguenti librerie (oltre a quelle standard):
 +
 +  * libaio.so.1 
 +  * libclntsh.so.11.1 
 +  * libnnz11.so 
 +
 +===== Variabile ORACLE_HOME =====
 +
 +Bisogna impostare la variabile **''ORACLE_HOME=/usr/lib/oracle/11.2/client''**, è necessaria alla libreria per trovare il file **''network/admin/tnsnames.ora''**
 +
 +Si può mettere direttamente in uno script cgi-bin (es. ''/usr/lib/cgi-bin/wms_prova'') che poi esegue il mapserver:
 +
 +<code bash>
 +#!/bin/sh
 +MAPSERV="/usr/lib/cgi-bin/mapserv.fcgi"
 +MAPFILE="maps/wms/wms_verdepubblico.map"
 +export ORACLE_HOME="/usr/lib/oracle/11.2/client"
 +if [ "${REQUEST_METHOD}" = "GET" ]; then
 +  if [ -z "${QUERY_STRING}" ]; then
 +    QUERY_STRING="map=${MAPFILE}"
 +  else
 +    QUERY_STRING="map=${MAPFILE}&${QUERY_STRING}"
 +  fi
 +  exec ${MAPSERV}
 +else
 +  echo "Sorry, I only understand GET requests."
 +fi
 +exit 1
 +</code>
 +
 +Esempio di tnsnames.ora:
 +
 +<file>
 +sitfi02 =
 +   (DESCRIPTION =
 +    (ADDRESS_LIST =
 +      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle.intranet.net)(PORT = 1521))
 +    )
 +    (CONNECT_DATA =
 +      (SERVICE_NAME = dbinstance)
 +    )
 +  )
 +</file>
 +
tecnica/gps_cartografia_gis/mapserver_oracle.txt · Last modified: 2011/12/06 13:08 by niccolo