Prev Up Next Index
Go backward to 2 Practice I: Installing the OPeNDAP Catalog/Aggregation Server
Go up to 2 Practice I: Installing the OPeNDAP Catalog/Aggregation Server
Go forward to 2.2 Locating the Configuration File

2.1 Install Jakarta-Tomcat Server

To begin installation, you must install the Tomcat servlet engine. The Aggregation Server will work under either Tomcat 3.3 or 4.0. Install Tomcat in standalone mode. This is the default configuration, using port 8080 and the default tomcat.conf and server.xml files.

Here is an example installation, assuming that the Aggregation Server name is dodsC, so that all URLS start with server/dodsC, where server is whatever the name of your machine is.

  1. Edit $TOMCAT_HOME/bin/startup.sh and make sure it contains the equivalent of the following:

    export TOMCAT_HOME=/usr/local/jakarta-tomcat
    export JAVA_HOME=/usr/local/jdk1.4
    

    Of course you may use different pathnames, depending on where you've installed Tomcat or Java.

  2. For expected heavy loads, you might want to increase the memory given to the server. If so, edit $TOMCAT_HOME/bin/tomcat.sh and set the desired amount of memory, for example:

    TOMCAT_OPTS = "-Xmx512m"
    
  3. Edit $TOMCAT_HOME/conf/server.xml and add the following:

    <Context path="/dodsC"
             docBase="webapps/dodsC"
             crossContext="false"
             debug="0"
             reloadable="false" >
    </Context>
    
  4. Create the directory $TOMCAT_HOME/webapps/dodsC, and copy dodsC.war into it.
  5. Unpack dodsC.war:

    cd $TOMCAT_HOME/webapps/dodsC
    jar -xf dodsC.war
    
     
  6. Default server values are in the web.xml file, located in $TOMCAT_HOME/webapps/dodsC/WEB-INF/. You might want to change one or more of the init-param values, but it should work correctly right out of the box. In particular, runtime debug flags can be set with an init-param name of DebugOn, and a value of (space delimited) debug flag names. Currently only the showRequests flag is useful to the user. This will log each request received by Tomcat to the server console.

    Here's an excerpt from an example web.xml file:

     

    <web-app>
      <display-name> OPeNDAP Catalog/Aggregation Server</display-name>
      <description>
        OPeNDAP Catalog Aggregation Server - for netCDF and 
        Aggregation datasets.
      </description>
      <servlet>
        <servlet-name> dodsC </servlet-name>
        <servlet-class> 
          dods.servers.agg.CatalogServlet 
        </servlet-class>
        <init-param>
          <param-name>displayName</param-name>
          <param-value>OPeNDAP Aggregation Server</param-value>
        </init-param>
        <init-param>
          <param-name>serverConfig</param-name>
          <param-value>
            file:///../webapps/dodsC/AggServerConfig.xml
          </param-value>
        </init-param>
        <init-param>
          <param-name>maxDODSDatasetsCached</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>maxNetcdfFilesCached</param-name>
          <param-value>100</param-value>
        </init-param>
        <load-on-startup/>
      </servlet>
      <servlet-mapping>
        <servlet-name>dodsC</servlet-name>
        <url-pattern>/</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>30</session-timeout>
        <!-- 30 minutes -->
      </session-config>
    </web-app>
    

Tom Sgouros, 2004/07/07

Prev Up Next