Installing on a pristine Tomcat
Esta página aún no está disponible en tu idioma.
This section describes how to deploy OpenKM in a pristine Apache Tomcat.
Preliminaries
Section titled “Preliminaries”Take a look at the installation instructions for your operating system:
- Installing on Red Hat and CentOS (Manual)
- Installing on Ubuntu and Debian (Manual)
- Installing on Windows
Installing Tomcat
Section titled “Installing Tomcat”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 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 https://sourceforge.net/projects/openkm/files/common/
- 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 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.pidexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewerAnd 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\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 Red Hat and CentOS (Manual)
- Installing on Ubuntu and Debian (Manual)
- Installing on Windows
Start the application
Section titled “ Start the application”Check the openkm.properties parameters
Section titled “Check the 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.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 filelogback.config=logback.xmlFirst-time application start:
$ 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 with the password: admin (do not forget to change it). For more information: Manage users and roles.