[GeoNetwork-users] Installing Geonetwork21 under IIS, Tomcat and PGSQL

Hello alls,
I had some bad days installing GN21 under IIS, tomcat and PGsql, so I wanted to share my collection of "tricks". I hope it helps!!!

1- Install JRE
People says that Geonetwork does not work well under JRE1.6, so I installed jre-1_5_0_11-windows-i586-p.exe. But in fact, I had some problems accessing the postgres database. So I got around this, installing JRE1.6 with the parser_xalan( xalan.jar et serializer.jar)

2- Install Tomcat
I did a regular install of Tomcat, with examples, and running as a Windows service.

Under the tomcat monitor, I have:
    Java Virtual machine: C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll
    Java Options: -Dcatalina.home=C:\Program Files\Tomcat55
        -Dcatalina.base=C:\Program Files\Tomcat55
        -Djava.endorsed.dirs=C:\Program Files\Tomcat55\common\endorsed
        -Djava.io.tmpdir=C:\Program Files\Tomcat55\temp
        -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
        -Djava.util.logging.config.file=C:\Program Files\Tomcat55\conf\logging.properties -Xmx512m -Xms48m
    
The default port of Tomcat is 8080, be careful to remember the administrative password.
-> Test tomcat: http://localhost:8080

3- Install the Tomcat connector into IIS

You have to follow the instructions from the tomcat website (tomcat-iis-howto.html) and http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html?page=1

Careful, on the tomcat website, they say that you should modify the "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters\Filter DLLs". That did not work for me. What I did was to follow the www.onjava.com instructions that I reproduce here:

    1. In the registry, create a new registry key named "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"
    2. Add a string value with the name extension_uri and a value of /jakarta/isapi_redirect.dll
    3. Add a string value with the name log_file and a value pointing to where you want your log file to be (for example c:\jakarta-tomcat\logs\isapi.log ).
    4. Add a string value with the name log_level and a value for your log level (can be debug, info, error or emerg).
    5. Add a string value with the name worker_file and a value which is the full path to your workers.properties file (for example c:\jakarta-tomcat\conf\workers.properties )
    6. Add a string value with the name worker_mount_file and a value which is the full path to your uriworkermap.properties file (for example c:\jakarta-tomcat\conf\uriworkermap.properties )
    7. Using the IIS management console, add a new virtual directory to your IIS/PWS web site. The name of the virtual directory must be jakarta. Its physical path should be the directory where you placed isapi_redirect.dll (in our example it is c:\jakarta-tomcat\bin\win32\i386). While creating this new virtual directory assign it with execute access. 11. We now need to add the ISAPI Redirector to the default Web site, so right-click on the default Web site and select the menu item Properties.
    8. Select the ISAPI Filters tab and press the Add button.
    9. Enter a filter name and browse to the location of the isapi_redirector.dll file. The following image shows the values that I have used in my instance.
    10. Restart IIS

File tomcat/conf/uriworkermap.properties
/jsp-examples/*=testWorker
/servlets-examples/*=testWorker
/geonetwork/*=testWorker
/geoserver/*=testWorker
/intermap/*=testWorker
/tomcat-docs/*=testWorker

File workers.properties
worker.list=testWorker
worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13

Logs:
IIS: C:\WINDOWS\system32\Logfiles\W3SVC1
TOMCAT: C:\Program Files\Tomcat55\logs

Test the tomcat connector: http://localhost/jsp-examples/index.html

4- Install the Pgsql connector
    - In GN2.1, the Pgsql connector is already installed, so this step is optional.
    - I got the most recent connector, for example: postgresql-8.2-506.jdbc4.jar
    - I copy the file to <install_tomcat>/common/lib and <install JRE1.5>\lib\ext et <install_geonetwork>/geonetwork\WEB-INF\lib

5- Install Geonetwork 2.1
    
    Careful, after installing, a message asking if you want to create and example database appears. In my case, the message was appearing under the main dialogue, and I did not understand why the installation could not finish!
    Careful too: You'll have to remember the default GN user: admin witj pw=admin

    - You can test the default install with the default application server: http://localhost:8080 (fisrt stop tomcat, and start the GN server)

    - I had to indicate the absolute path for Intermap to work: intermap/WEB-INF/config.xml
        <!-- temp files -->
        <param name="tempDir" value="c:/geonetwork/web/intermap/tmp/" />
        <param name="tempDeleteMinutes" value="15" />
        <param name="tempUrl" value="/intermap/tmp" />

        <!-- http cache -->
        <param name="httpCacheDir" value="c:/geonetwork/web/intermap/httpCache/" />
        <param name="httpCacheDeleteEvery" value="60" />
        <param name="useCache" value="true" />

    - To configure Tomcat, I followed the instructions of the geonetworksetupsupporting.pdf, but I did some modificatiosn that I reproduce here:

    go to the Tomcat configuration file: C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    Add to the end (just before the </Host> tab the following:
    
    <Context
    path="/geonetwork"
    docBase="C:\geonetwork\web\geonetwork"
    crossContext="false"
    debug="1"
    reloadable="false" />
    <Context
    path="/intermap"
    docBase="C:\geonetwork\web\intermap"
    crossContext="false"
    debug="1"
    reloadable="false" />
    <Context
    path="/geonetwork/intermap"
    docBase="C:\geonetwork\web\intermap"
    crossContext="false"
    debug="1"
    reloadable="false" />

    Then go to the tab
    <Connector
    port="8080"
    maxHttpHeaderSize="8192"
    maxThreads="150"
    minSpareThreads="25"
    maxSpareThreads="75"
    enableLookups="false"
    redirectPort="8443"
    acceptCount="100"
    connectionTimeout="20000"
    disableUploadTime="true"
    URIEncoding="UTF-8"/>

6- Postgres
    - In PGadmin, create the DB "geonetwork"
    - In GAST:
    Options config:
        External
            - Localhost, 8080, geonetwork
            - Authentified user: This is a geonetwork user, by default: admin, admin
    DBMS config:
        server: localhost
        port: 5432
        Db: geonetwork
        user: admin (the postgres db user)
         pwd: <pwdpostgres>

-> restart Tomcat

    - In GAST, setup DB, and then Sample Data.

That's how it worked for me, but I'm no expert, so good luck!

Michel Le Page
IRD, Institut de Recherche pour le Développement
CESBIO, Centre d'Etudes Spatiales de la Biosphère
http://lepage.michel.googlepages.com

      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail

Thanks Michel. I just installed GeoNetwork v2.1 with Apache / Tomcat /
PostgreSQL and was having problems with Intermap (the waiting / loading
logo). Changing the intermap variables to absolute path and including
"geonetwork/intermap" in the Context (as listed above) did the trick. FYI
for others with similar intermap problems.
--
View this message in context: http://www.nabble.com/Installing-Geonetwork21-under-IIS%2C-Tomcat-and-PGSQL-tp13152781s18419p14562787.html
Sent from the geonetwork-users mailing list archive at Nabble.com.