Difference between revisions of "Configure Tomcat service windows"

From OpenKM Documentation
Jump to: navigation, search
Line 26: Line 26:
 
Modify file c:\tomcat-7.0.27\conf\context.xml.
 
Modify file c:\tomcat-7.0.27\conf\context.xml.
  
After line:
+
3.1 - After line:
 
<source lang="xml">
 
<source lang="xml">
 
<WatchedResource>WEB-INF/web.xml</WatchedResource>
 
<WatchedResource>WEB-INF/web.xml</WatchedResource>
Line 39: Line 39:
 
Modify file c:\tomcat-7.0.27\conf\server.xml.
 
Modify file c:\tomcat-7.0.27\conf\server.xml.
  
After line:
+
4.1 - After line:
 
<source lang="xml">
 
<source lang="xml">
 
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
 
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
Line 49: Line 49:
 
</source>
 
</source>
  
 
+
4.2 - Into the tag <GlobalNamingResources> add the lines:
Into the tag <GlobalNamingResources> add the lines:
 
 
<source lang="xml">
 
<source lang="xml">
 
<Resource auth="Container" driverClassName="org.hsqldb.jdbcDriver" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/OpenKMDS" password="" type="javax.sql.DataSource" url="jdbc:hsqldb:${catalina.base}/repository/okmdb" username="sa" validationQuery="select 1 from INFORMATION_SCHEMA.SYSTEM_USERS"/>  
 
<Resource auth="Container" driverClassName="org.hsqldb.jdbcDriver" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/OpenKMDS" password="" type="javax.sql.DataSource" url="jdbc:hsqldb:${catalina.base}/repository/okmdb" username="sa" validationQuery="select 1 from INFORMATION_SCHEMA.SYSTEM_USERS"/>  
Line 58: Line 57:
 
</source>
 
</source>
  
 
+
4.3 - Modify line:
Modify line:
 
 
<source lang="xml">
 
<source lang="xml">
 
<Connector connectionTimeout="20000" port="8880" protocol="HTTP/1.1" redirectPort="8443"/>
 
<Connector connectionTimeout="20000" port="8880" protocol="HTTP/1.1" redirectPort="8443"/>

Revision as of 17:15, 14 September 2013

Running as a Windows Service

Configure OpenKM in windows as service need some extra work because are several tomcat versions depending your hardware architecture.

We recommend before starting with installation have some good test editor application like Geany] because will be needed modify some xml files.

Step 1 - Download OpenKM Bundle

Download from [| sourceforge.net] the latest OpenKM bundle, name will be something like openkm-X.X.X-community-tomcat-bundle.zip.

Uncompress zip file at c:\. It will create a c:\tomcat-7.0.27 folder. Rename c:\tomcat-7.0.27 folder to c:\openkm


Nota clasica.png At the moment we have writting documentation the latest version is openkm-6.2.3-community-tomcat-bundle.zip

Step 2 - Select your tomcat

Uncompress zip file at c:\. It will create a c:\tomcat-7.0.27 folder


Nota clasica.png At this point we got two folders c:\openkm which contains OpenKM bundle and tomcat-7.0.27 which contains tomcat in correspondence with your hardware architecture

Step 3 - Modify context.xml files

Modify file c:\tomcat-7.0.27\conf\context.xml.

3.1 - After line:

<WatchedResource>WEB-INF/web.xml</WatchedResource>

Add lines:

<ResourceLink global="jdbc/OpenKMDS" name="jdbc/OpenKMDS" type="javax.sql.DataSource"/>
<ResourceLink global="mail/OpenKM" name="mail/OpenKM" type="javax.mail.Session"/>

Step 4 - Modify server.xml files

Modify file c:\tomcat-7.0.27\conf\server.xml.

4.1 - After line:

<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

Add lines:

<!-- Automatically reload log4j configuration -->
<Listener className="com.openkm.util.Log4JInitializer" configFile="${catalina.base}/conf/log4j.properties"/>

4.2 - Into the tag <GlobalNamingResources> add the lines:

<Resource auth="Container" driverClassName="org.hsqldb.jdbcDriver" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/OpenKMDS" password="" type="javax.sql.DataSource" url="jdbc:hsqldb:${catalina.base}/repository/okmdb" username="sa" validationQuery="select 1 from INFORMATION_SCHEMA.SYSTEM_USERS"/> 
  
<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
            mail.smtp.host="localhost" mail.from="testing@openkm.com"/>

4.3 - Modify line:

<Connector connectionTimeout="20000" port="8880" protocol="HTTP/1.1" redirectPort="8443"/>
</source
To
<source lang="xml">
<Connector address="0.0.0.0" connectionTimeout="20000" port="8880" protocol="HTTP/1.1" redirectPort="8443"/>
</source


























=== Known issue ===
If you got openoffice or libreoffice configured will get some error when OpenKM try start as service, to solve it edit your general environment variable PATH and add your '''tomcat\lib\sigar\''' folder, for example like '''PATH=...;C:\Program Files\OpenKM-6.2.1\tomcat\lib\sigar'''
<source lang="java">
Caused by: java.lang.UnsatisfiedLinkError: org.hyperic.sigar.Sigar.getSigNum(Ljava/lang/String;)I
	at org.hyperic.sigar.Sigar.getSigNum(Native Method)
	at org.hyperic.sigar.Sigar.kill(Sigar.java:275)