Tolomeo is a java map client webapp. It can be used both as a standalone map client, or can be embedded within other apps.
Tolomeo shall be installed in a tomcat instance on its own, in order to decouple it from other installed webapps (i.e. GeoNetwork, Solr).
A new Tolomeo instance is optional in the OpenDataNetwork architecture, since a node may want to reuse existing Tolomeo instances.
It is expected that the base system has already been properly installed and configured as described in Tomcat Installation.
In such document there are information about how to install some required base components, such as the JDK and Apache Tomcat.
We’re going to install Tolomeo Catalina base in /var/lib/tomcat/tolomeo.
Make sure you already:
Download Tolomeo (it’s a 90MB .tgz file) and unzip it:
cd /root/download
wget http://tolomeogis.comune.prato.it/download/tolomeo/3.7.1/tolomeo-3.7.1-war.zip
unzip tolomeo-3.7.1-war.zip
Create catalina base directory for Tolomeo:
cp -a /var/lib/tomcat/base/ /var/lib/tomcat/tolomeo
Copy .war file
cp -av /root/download/tolomeo.war /var/lib/tomcat/tolomeo/webapps
Tolomeo needs a config directory to start. You can use the sample config in the .war file.
You can have tomcat extract the war file for you, but it needs to be run first, and as a first run it will end with an error. Let’s unpack the .war file ourselves:
cd /var/lib/tomcat/tolomeo/webapps
mkdir tolomeo
cd tolomeo
jar -xzvf ../tolomeo.war
cd ../..
cp -a webapps/tolomeo/WEB-INF/config .
Tolomeo needs to know where such file is.
Edit the file webapps/tolomeo/WEB-INF/web.xml and add the element:
<context-param>
<param-name>configFilePath</param-name>
<param-value>/var/lib/tomcat/tolomeo/config/tolomeo.properties</param-value>
</context-param>
Should you need to change the memory setting for the Tolomeo tomcat instance, edit (create if necessary) the file /var/lib/tomcat/tolomeo/bin/setenv.sh and add the line
export JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx800m -XX:MaxPermSize=256m"
Then make setenv.sh executable:
chmod +x /var/lib/tomcat/tolomeo/bin/setenv.sh
We have to setup ports for Tolomeo, also according to the other tomcat instances running on the same machine.
According to Installed applications we will change the tomcat ports in file /var/lib/tomcat/tolomeo/conf/server.xml in this way:
Set the ownership of the tolomeo/ related directories to user tomcat
chown tomcat: -R /var/lib/tomcat/tolomeo
The standard Systemd way for setting Tolomeo as an autostarting service is:
systemctl enable tomcat@tolomeo
Once Tolomeo has been installed, you can start it with:
systemctl start tomcat@tolomeo
These are the commands for starting, stopping and querying Tolomeo status:
As root, create the file /etc/httpd/conf.d/91-tolomeo.conf and add the following content:
ProxyPass /tolomeo ajp://localhost:8010/tolomeo
ProxyPassReverse /tolomeo ajp://localhost:8010/tolomeo
and reload the configuration
systemctl reload httpd