Installing on Windows
Preliminaries
Check that you have enought disk size.
We recommend installing these tools:
Checking Java version
C:\> java -version
If Java is correctly installed on your computer, the name and version of the Java virtual machine is displayed:
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
The Java version may be different depending on your installed one, but we always recommend the latest 1.8 release.
We recommend also setting the JAVA_HOME variable:
setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_101" /M
Install Java
Do these steps only if java 8 is not installed on your server.
If the required version of Java is not installed on your computer:
- Download it from the Oracle website (Java 8) and choose the appropriate platform for your hardware and Windows version.
- Run the downloaded .exe file and follow the instructions displayed.
Installing database
Install MySQL if you do not have it already installed:
Download MySQL MSI Installer from MySQL Community Server and follow the installation wizard steps.
If you do not have a MySQL client software it is also good idea to install MySQL Workbench.
Check InnoDB is default MySQL engine
show engines;
It should show something like this:
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
If it not default, modify c:\ProgramData\MySQL\MySQL Server 5.6\my.ini
and under [mysqld] add
default-storage-engine = innodb
After changing default MySQL engine the MySQL service must be restarted to take effect.
Create database
CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY 'password';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;
Installing OpenKM and Tomcat bundle
Unzip openkm-6.3.2-community-tomcat-bundle.zip to c:\
The Tomcat version numeration name can be altered in order to be upgraded to major version.
Copy files from C:\tomcat\bin\x86 or C:\tomcat\bin\x64 to C:\tomcat\bin based on the server architecture.
Configuring Tomcat as a service
Register the service:
Open a windows terminal as administrator.
cd c:\tomcat\bin
service.bat install
Set the JVM parameters for the Tomcat service:
The parameters below are deprecated when you are running OpenJDK 1.8. do not execute these ones:
openkm //US//OpenKM ++JvmOptions="-XX:PermSize=256m"
openkm //US//OpenKM ++JvmOptions="-XX:MaxPermSize=512m"
cd c:\tomcat-7.0.61\bin
openkm //US//OpenKM ++JvmOptions="XX:+UseG1GC"
openkm //US//OpenKM ++JvmOptions="-Djava.awt.headless=true"
openkm //US//OpenKM ++JvmOptions="-Djava.net.preferIPv4Stack=true"
openkm //US//OpenKM ++JvmOptions="-Dfile.encoding=utf-8"
openkm //US//OpenKM ++JvmOptions="-Dsun.jnu.encoding=UTF-8"
openkm //US//OpenKM ++JvmOptions="-Dmail.mime.ignoreunknownencoding=true"
Execute the tomcat7w.exe as administrator:
Check the configuration parameters:
Also you can change "Startup type" to Automatic.
More information about how to configure Tomcat service on Windows at: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
Check the service
From terminal
Start the service:
$ net start tomcat7
Stop the service:
$ net stop tomcat7
From Windows service panel
From tomcat7w tool
Configuring environment variables
Add to environment path variable the sigar folder, the bin folder:
setx PATH "%PATH%;C:\tomcat\lib\sigar" /M
setx PATH "%PATH%;C:\tomcat\bin" /M
These operations also can be done from Windows environment variables:
Depending on your Windows OS version the next screens could be quite different.
Add sigar folder path - c:\tomcat\lib\sigar\ - to your environment path variable:
Installing OpenKM
With Tomcat stopped copy the OpenKM.war file into /home/openkm/tomcat/webapps
$ copy OpenKM.war c:\tomcat-7.0.61\webapps
Install third party software:
Software | Required | Description |
---|---|---|
Yes |
We recommend using OpenOffice rather than Libreoffice, because we've found problems in some servers to setup as service by OpenKM. |
|
No |
Download from https://code.google.com/p/tesseract-ocr/ and follow the installation wizard. |
|
No |
Download from http://www.clamav.net/download.html and follow the installation wizard. | |
No |
Tomcat bundle comes with embedded convert tool. In case you decide for install it, go to http://www.imagemagick.org/script/binary-releases.php and download the latest binary release and follow the installation wizard. Take in consideration 16 bits needs more hardware resources than 8 bits. We suggest ImageMagick-6.9.1-7-Q8-x64-dll.exe rather than ImageMagick-6.9.1-7-Q16-x64-dll.exe ( note the version numeration can be distinct due ImageMagick version upgrade ). |
|
No |
Tomcat bundle comes with embedded Ghostscript tool. If you decide installing it, go to http://ghostscript.com/download/gsdnld.html and follow the installation wizard. |
|
There is also an available Extras.zip file that contains all these software as a Portable edition. |
Start application
Check OpenKM.cfg parameters
C:\> geany c:\openkm\OpenKM.cfg
Your configuration should be something like this:
# OpenKM Hibernate configuration values
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl=create
# Initial configuration - Windows
system.openoffice.path=C:/Program Files (x86)/OpenOffice 4
Ensure hibernate.dialect=org.hibernate.dialect.MySQL5Dialect is enabled if your database is MySQL.
First time application start:
$ net start tomcat7
Use mTail Program - or equivalent - to watch the c:\tomcat-7.0.61\log\catalina.log file
When application is started you'll see it in the log file the lines:
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 by user:okmAdmin with password:admin. ( Do not forget to change it !). For more information: Manage users and roles.
Configure default extensions:
Go to Administration > Database query and execute:
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('808e7a42-2e73-470c-ba23-e4c9d5c3a0f4', 'Live Edit');
INSERT INTO OKM_EXTENSION (EXT_UUID, EXT_NAME) VALUES ('58392af6-2131-413b-b188-1851aa7b651c', 'HTML Editor 4');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) VALUES (1, '808e7a42-2e73-470c-ba23-e4c9d5c3a0f4');
INSERT INTO OKM_PROFILE_MSC_EXTENSION (PEX_ID, PEX_EXTENSION) VALUES (1, '58392af6-2131-413b-b188-1851aa7b651c');
Other common additional setup configurations
OpenKM comes with a lot of configuration parameters please take a look at: Recommended configuration parameters.
- Configuring Apache HTTP Reverse-Proxy
- Configuring mail
- Configuring Tomcat memory utilization
- Configuring Tomcat port
- Configuring Tomcat SSL/TLS
- Configuring Tomcat timezone
Restart installation from scratch
The OpenKM first startup does some background configurations like filesystem folder creation, changes in the OpenKM.cfg what only happens during the first startup.
Sometimes maybe some mistake in OpenKM configuration, for example, wrong database connection or similar issues during the first startup what raise and application failure. To restart the installation from scratch we suggest following the next steps.
- Ensure OpenKM is stopped.
- Edit the OpenKM.cfg and set the parameter hibernate.hbm2ddl=create
- In case issue with database connection, we suggest checking the connection from the OpenKM server. Remember some databases require enabling the user to gain connection from a server ( specific IP, range of IP, any server ).
- Delete the folder named "repository"
- Start OpenKM.