Need help in installing and configuring mapserver for oracle support

listuser H. listuser at HERZSYS.DE
Wed Aug 24 00:50:08 PDT 2005


On Wednesday 24 August 2005 06:34, Aniruddha S. Khadkikar wrote:
> Hi all.
> I am new to the installation of Mapserver with Oracle Spatial support. I
> have downloaded the Oracle related binaries (for Oracle 9.2). Could
> anyone please give me a guide to configuring and installing Mapserver? I
> want to document the process step by step and create a guide for future
> reference.
> Thanks
> Aniruddha
>
> *****************************************************************
> This email is virus free by TrendMicro Inter Scan Security Suite.
> *****************************************************************

Hi Aniruddha,

there is already a guide in the mapserver wiki 
(http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?OracleSpatial) but some more 
details will help others.

I don't know on which system you are but I can give you some hints for the 
linux installation.

if you haven't already installed the oracle client you should do this first. 
You can have look at:
http://www.puschitz.com/InstallingOracle9i.shtml

After this install there should be a folder with OraHome or however you named 
it. This folder must be given to the configure script of mapserver 
(e.g.  ./configure --with-oraclespatial=/opt/oracle/OraHome1/). After running 
this you should check the output. If it is OK you can "make" the mapserver.

If all is done you can test the binary "./mapserv -v". Then you only have to 
copy the mapserv to the cgi-bin folder of apache and set the paths if not 
done for the instalation e.g. in the /etc/bash.bashrc:

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/OraHome1
export ORACLE_SID=testdb
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

You have to set up a TNS in 
e.g. /opt/oracle/OraHome1/network/admin/tnsnames.ora

To see if the TNS and the client works you can make a test with sqlplus e.g.
sqlplus usr/pwd at testdb

Then you can set up a test .map file with an oracle layer e.g.:

  LAYER
    NAME "ORA_TestLayer"
    TYPE LINE
    CONNECTIONTYPE oraclespatial
    CONNECTION "usr/pwd at testdb"
    DATA GEOM FROM A_TABLE  USING SRID 82027"
    STATUS DEFAULT
    PROJECTION
      "init=epsg:31467"
    END
    CLASS 
      COLOR        80 130 220
    END 
  END

If this fails then you can try set the environment to the httpd.conf file and 
restart your apache e.g.:

  SetEnv ORACLE_BASE "/opt/oracle"
  SetEnv ORACLE_HOME "/opt/oracle/OraHome1"
  SetEnv ORACLE_SID "testdb"


I hope this helps.

Regards,
Norbert



More information about the MapServer-users mailing list