Run security.manager for OGC without Tomcat

This how-to describes how you can run security.manager for OGC without Tomcat using a simple command from the command line.
This method is not recommended for production environments and is not supported.

For testing purposes, you can run security.manager for OGC without Tomcat and skip the installation of Tomcat in this case.

Prerequisites

  • You have access to the secman-ogc.war from the delivery file of security.manager for OGC security.manager-for-OGC-<version>.zip.

  • You have created a valid configuration for security.manager for OGC. The steps for this are described in the installation documentation.

Run security.manager for OGC

  1. Open a terminal window

  2. Change to the directory containing the secman-ogc.war.

  3. Run security.manager for OGC with the following command:

    java -jar secman-ogc.war

After startup, you can access the application via the URL http://localhost:8080. The application is available at the root context path /.

Set the data directory

If you want to use a different directory than the default data directory for the configuration, specify the path of the data directory with the environment variable DATA_DIRECTORY_LOCATION.

In a Unix shell, for example, you can use the following command:

DATA_DIRECTORY_LOCATION=/path/to/data java -jar secman-ogc.war

Replace /path/to/data with the path of the directory containing the configuration files.

Set the port

You can also specify a different port than 8080 on which security.manager for OGC should accept requests.

In a Unix shell, for example, you can use the following command:

SERVER_PORT=9090 java -jar secman-ogc.war

security.manager for OGC is then accessible via the URL http://localhost:9090.

Change the logging

If you want to have the logs directly in the console, enable LOGGING_CONSOLE_ENABLED and optionally disable LOGGING_FILE_ENABLED.

In a Unix shell, for example, you can use the following command:

LOGGING_CONSOLE_ENABLED=true LOGGING_FILE_ENABLED=false java -jar secman-ogc.war