Skip to content
Other versions

Loading…

Installing on a pristine Tomcat

This section describes how to deploy OpenKM in a pristine Apache Tomcat.

Take a look at the installation instructions for your operating system:

Download the latest Tomcat version from the Apache Tomcat page ( Tomcat 8 ) and extract it into the directory where you want to install it.

Once Tomcat has been extracted, some modifications are necessary.

Copy the following required libraries to TOMCAT_HOME/lib. These files can be found in the Tomcat distribution already configured by the OpenKM team, which can be downloaded from https://sourceforge.net/projects/openkm/files/common/

  • unicode.ttf

Copy the following files to TOMCAT_HOME:

  • openkm.properties
  • logback.xml

Modify the following files in TOMCAT_HOME/conf:

setenv.sh or setenv.bat

Depending on your operating system, you may have to create a file called setenv.sh on Linux or setenv.bat on Windows. This file should be placed in TOMCAT_HOME/bin. This is the content for Linux:

JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx2048m -XX:+UseG1GC -XX:+UseStringDeduplication"
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$CATALINA_HOME"
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Dmail.mime.ignoreunknownencoding=true"
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider"
CATALINA_PID=$CATALINA_HOME/catalina.pid
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewer

And this is the content for Windows:

set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx2048m -XX:+UseG1GC -XX:+UseStringDeduplicationset JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%CATALINA_HOME%set JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true -Dmail.mime.ignoreunknownencoding=trueset JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=trueset PATH=%PATH%;%CATALINA_HOME%\bin\cadviewer

With Tomcat stopped, copy the OpenKM.war file into TOMCAT_HOME/webapps

Terminal window
$ mv openkm.war $TOMCAT_HOME/webapps

To do this, go to the section corresponding to your operating system:

Terminal window
$ vim TOMCAT_HOME/openkm.properties

Your configuration file should contain something like this:

# OpenKM Hibernate configuration valuesspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/okmdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=CET&nullNamePatternMatchesAll=truespring.datasource.username=openkmspring.datasource.password=openkm
# JPA stuffspring.jpa.hibernate.ddl-auto=createspring.jpa.properties.hibernate.dialect=com.openkm.db.dialect.MySQL57InnoDBDialect
# Logback configuration file
logback.config=logback.xml

First-time application start:

Terminal window
$ start openkm

When the application starts, you should see these log messages:

2015-07-04 18:28:10,680 [main] INFO org.apache.coyote.http11.Http11Protocol - Starting ProtocolHandler ["http-bio-0.0.0.0-8080"]
2015-07-04 18:28:10,688 [main] INFO org.apache.coyote.ajp.AjpProtocol - Starting ProtocolHandler ["ajp-bio-127.0.0.1-8009"]
2015-07-04 18:28:10,692 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 41456 ms

The application will be accessible at http://YOUR_IP:8080/openkm using the user: okmAdmin with the password: admin (do not forget to change it). For more information: Manage users and roles.