Installing on a pristine Tomcat
This section explains how to deploy OpenKM on a pristine Apache Tomcat.
Preliminaries
Section titled “Preliminaries”Take a look at the installation of the whole system for your operating system:
- Installing on RedHat and CentOS (OLD)
- Installing on Ubuntu and Debian (OLD)
- Installing on Windows
Installing Tomcat
Section titled “Installing Tomcat”Download the latest Tomcat version ( Tomcat 9 ) from the Apache Tomcat page and extract it into the directory where you want to install it.
Once Tomcat has been extracted, some modifications are necessary.
Copy libraries and configuration files
Section titled “Copy libraries and configuration files”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 http://download.openkm.com/okm/tomcat-9.0.82.zip
- unicode.ttf
Copy the following files to TOMCAT_HOME:
- openkm.properties
- logback.xml
Modify configuration files
Section titled “Modify configuration files”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 in Linux or setenv.bat in Windows. This file should be placed in TOMCAT_HOME/bin. This is the content in the case of Linux:
JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx4096m -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.pidexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewerAnd this is the content in the case of Windows:
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx4096m -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\cadviewerInstalling OpenKM
Section titled “Installing OpenKM”With Tomcat stopped, copy the OpenKM.war file into TOMCAT_HOME/webapps
$ mv openkm.war $TOMCAT_HOME/webappsInstall third-party software
Section titled “Install third-party software”To do this, go to the section corresponding to your Operating System:
- Installing on WindowsInstalling on Ubuntu and Debian
- Installing on RedHat and CentOS
- Installing on Windows
Start the application
Section titled “Start the application”Check openkm.properties parameters
Section titled “Check openkm.properties parameters”$ vim TOMCAT_HOME/openkm.propertiesYour configuration file should contain something like this:
# OpenKM Hibernate configuration valuesspring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&nullNamePatternMatchesAll=true&serverTimezone=Europe/Madridspring.datasource.username=openkmspring.datasource.password=openkm# JPA stuffspring.jpa.hibernate.ddl-auto=createspring.jpa.properties.hibernate.dialect=com.openkm.db.dialect.MySQL5InnoDBDialect
# Logback configuration filelogback.config=logback.xmlFirst-time application startup:
$ start openkmWhen 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 msThe application will be accessible at http://YOUR_IP:8080/openkm using the user okmAdmin and the password admin. (Do not forget to change it!) For more information: Manage users and roles.