Difference between revisions of "OpenKM.cfg"

From OpenKM Documentation
Jump to: navigation, search
Line 1: Line 1:
{{TOCright}} __TOC__
+
You can modify some OpenKM default behavior.
  
== OpenKM configuration file ==
+
* '''repository.config''': Specify the repository configuration file. This is an XML which describe the repository configuration. Here you can alter the FileSystem and PersistenceManage for Workspace and Versioning. By default set to "repository.xml". See [[Repository configuration]] for more info.
OpenKM.cfg file is the main OpenKM configuration file. You can find this file in your server in ''$JBOSS_HOME/OpenKM.cfg''. This is a list of the admitted configuration properties:
 
  
<source lang="java">
+
* '''repository.home''': This is the folder name where the repository data is stored, but this information depends on the configuration defined in "repository.xml" because the repository contents can be stored in disk or in a database. By default set to "repository".
repository.config
 
repository.home
 
system.user
 
default.user.role
 
default.admin.role
 
principal.adapter
 
max.file.size
 
max.search.results
 
system.demo
 
system.ocr
 
application.url
 
default.lang
 
system.login.username.lowercase
 
system.pdf2swf
 
system.openoffice
 
kea.thesaurus.skos.file
 
kea.thesaurus.owl.file
 
kea.thesaurus.base.url
 
kea.thesaurus.vocabulary.serql
 
kea.stopwords.file
 
kea.automatic.keyword.extraction.number
 
kea.thesaurus.tree.root
 
kea.thesaurus.tree.childs
 
subscription.message.subject
 
subscription.message.body
 
notify.message.subject
 
notify.message.body
 
</source>
 
  
{{Note|Each time you make some change in the OpenKM.cfg file JBoss server must be restarted to take effect.}}
+
* '''principal.adapter''': OpenKM use JAAS (Java Authentication and Authorization Service) to    manage    authentication.    can handle user access using the JBoss ''org.jboss.security.auth.spi.DatabaseServerLoginModule'' login module by default. OpenKM needs an available method for reading users and roles. The class ''com.openkm.principal.DatabasePrincipalAdapter'' does this job. For more info, read http://jboss.org/community/docs/DOC-10760.
  
== Changing uploading max file size ==
+
* '''max.file.size''': Defines the maximum size for a document. If the document size exceed this quantity, the application throws an ''FileSizeExceededException'' and the document won't be added to the repository. The size is measured in MB, so if you set this property to 25, the maximum document size will be 25 MB. By default set to 25.
The default limit is 25MB. If you want to increase to 50MB:
 
file.size=50.
 
  
== Changing repository.xml configuration filename and path ==
+
* '''restrict.file.mime''': If you set this property to "on", only files with a registered MIME type are allowed to be added to the repository. If the file don't match any registered MIME type an ''UnsupportedMimeTypeException'' is thrown. The list of registered MIME type is defined in the file ''$JBOSS_HOME/server/default/deploy/OpenKM.war/WEB-INF/classes/com/openkm/core/mime.types''. The changes in the file won't take effect until you restart the JBoss server. If you add a new MIME type, don't forget to add the corresponding icon at ''$JBOSS_HOME/server/default/deploy/OpenKM.war/com.openkm.frontend.Main/img/icon/mime''. By default set to "off".
repository.config=repository.xml
 
  
== Changing default repository home ==
+
* '''restrict.file.extension''': This configuration parameter limit the files added using the WebDAV connector. The reason to add this configuration property is that many application create temporal or backup files while you edit a document using the WebDAV connector, and you don't want to add these "phantom" files to the repository. By default set to “*~,*.bak”.
By default repository is stored in ''$JBOSS_HOME/repository'' folder but you can change it with:
 
repository.home=repotest
 
  
== Changing default connection role ==
+
* '''max.search.results''': To prevent heavy system load due to large search results, you can configure the maximum search results returned by a query. By default set to 25.
By default connection role to OpenKM is called UserRole, you can change to other role name. This change need some changes too in web.xml file into OpenKM.war/WEB-INF
 
default.user.role=OtherRole
 
  
<source lang="xml">
+
* '''application.url''': In subscriptions and notification messages an URL with the related document is included. Here you have to configure the URL used to access OpenKM from others computers. Notifications and subscriptions won't be available until this parameter is configured. This is a sample configuration: http://your-domain.com:8080/OpenKM/es.git.openkm.frontend.Main/index.jsp. By default set to null.
<security-constraint>
 
    <web-resource-collection>
 
      <web-resource-name>OpenKM Protected Area</web-resource-name>
 
      <!-- GWT -->
 
      <url-pattern>/es.git.openkm.frontend.Main/*</url-pattern>
 
      <url-pattern>/es.git.openkm.backend.Main/*</url-pattern>
 
      <!-- JSPs -->
 
      <url-pattern>/admin/*</url-pattern>
 
      <url-pattern>/mobi/*</url-pattern>
 
      <!-- Servlets -->
 
      <url-pattern>/RepositoryStartupServlet</url-pattern>
 
      <url-pattern>/Test</url-pattern>
 
      <url-pattern>/OKM*</url-pattern>
 
    </web-resource-collection>
 
    <auth-constraint>
 
      <role-name>AdminRole</role-name>
 
      <role-name>OtherRole</role-name>
 
    </auth-constraint>
 
    <user-data-constraint>
 
      <transport-guarantee>NONE</transport-guarantee>
 
    </user-data-constraint>
 
  </security-constraint>
 
  <login-config>
 
    <auth-method>FORM</auth-method>
 
    <realm-name>OpenKM</realm-name>
 
    <form-login-config>
 
      <form-login-page>/login.jsp</form-login-page>
 
      <form-error-page>/login.jsp?error=1</form-error-page>
 
    </form-login-config>
 
  </login-config>
 
  <security-role>
 
    <description>Admin user access</description>
 
    <role-name>AdminRole</role-name>
 
  </security-role>
 
  <security-role>
 
    <description>General user access</description>
 
    <role-name>OtherRole</role-name>
 
  </security-role>
 
</source>
 
  
== Changing default admin role ==
+
* '''notify.message.subject''': Can be used to set the notification mail message subject. See [[Notification and subscription messages]] for more info. By default set to "OpenKM - NOTIFICATION - {0}".
By default connection role to OpenKM is called AdminRole, you can change to other role name. This change need some changes too in web.xml file into OpenKM.war/WEB-INF
 
default.admin.role=OtherAdminRole
 
  
<source lang="xml">
+
* '''notify.message.body''': Can be used to set the notification mail message body. See [[Notification and subscription messages]] for more info. By default set to "<b>Document: </b><a href=\"{0}\">{1}</a><br/><b>User: </b>{3}<br/><b>Message:</b>{4}<br/>".
<security-constraint>
 
    <web-resource-collection>
 
      <web-resource-name>OpenKM Protected Area</web-resource-name>
 
      <!-- GWT -->
 
      <url-pattern>/es.git.openkm.frontend.Main/*</url-pattern>
 
      <url-pattern>/es.git.openkm.backend.Main/*</url-pattern>
 
      <!-- JSPs -->
 
      <url-pattern>/admin/*</url-pattern>
 
      <url-pattern>/mobi/*</url-pattern>
 
      <!-- Servlets -->
 
      <url-pattern>/RepositoryStartupServlet</url-pattern>
 
      <url-pattern>/Test</url-pattern>
 
      <url-pattern>/OKM*</url-pattern>
 
    </web-resource-collection>
 
    <auth-constraint>
 
      <role-name>OtherAdminRole</role-name>
 
      <role-name>UserRole</role-name>
 
    </auth-constraint>
 
    <user-data-constraint>
 
      <transport-guarantee>NONE</transport-guarantee>
 
    </user-data-constraint>
 
  </security-constraint>
 
  <login-config>
 
    <auth-method>FORM</auth-method>
 
    <realm-name>OpenKM</realm-name>
 
    <form-login-config>
 
      <form-login-page>/login.jsp</form-login-page>
 
      <form-error-page>/login.jsp?error=1</form-error-page>
 
    </form-login-config>
 
  </login-config>
 
  <security-role>
 
    <description>Admin user access</description>
 
    <role-name>OtherAdminRole</role-name>
 
  </security-role>
 
  <security-role>
 
    <description>General user access</description>
 
    <role-name>UserRole</role-name>
 
  </security-role>
 
</source>
 
  
== Change max results in UI ==
+
* '''subscription.message.subject''': Can be used to set the subscription mail message subject. See Notification and subscription messages for more info. By default set to "OpenKM - NOTIFICATION - {0}". subscription.message.body: Can be used to set the subscription mail message body. See [[Notification and subscription messages]] for more info. By default set to "<b>Document:</b><a href=\"{0}\">{1}</a><br/><b>User: </b>{3}<br/><b>Event: </b>{4}<br/><b>Comment: </b>{5}<br/>".
This option limits the search results in UI.
 
max.search.results=25
 
  
== Change principal adapter ==
+
* '''system.ocr''': If you want to use an OCR you should put here the path to the application executable. Actually only works with Tesseract. See OCR for more info. By default set to "".
OpenKM can handle user access using the JBoss DatabasePrincipalAdapter login module by default. OpenKM needs an available method for reading users and roles. The class DatabasePrincipalAdapter does this job. For more information take a look at [[OpenKM authentication]] and [[Active Directory]]
 
  
principal.adapter=com.openkm.core.DatabasePrincipalAdapter
+
* '''system.antivir''': OpenKM can be configured to check an uploaded document for viruses. Here you can specify the path of the executable antivir. Actually only works with ClamAV. See Antivirus for more info. By default set to "".
  
== Switch OpenKM to demo mode ==
+
* '''system.readonly''': To configure a read-only OpenKM instance. See Repository mirroring for more info. By default is set to "off".
In demo mode some options are disabled by default.
 
  
system.demo=on
+
* system.openoffice: This parameter is used to enable / disable the integration with OpenOffice.org application. Should be set to "on" to enable the document to PDF conversion feature. See [[Third-party software integration: OpenOffice.org]]for more info. By default set to "off".
  
== Enabling OCR ==
+
* '''default.lang''': Used to set the default OpenKM web interface language. By default set to english.
To enable OCR you must put the files system path of OCR engine
 
 
 
system.ocr=/usr/local/bin/tesseract
 
 
 
== Setting default lang to OpenKM UI ==
 
OpenKM By default tries setting language depending end user language browser. But you can set a language for all OpenKM users by default
 
default.lang=es_ES
 
 
 
== Force username to lowercase ==
 
You can forge all username be written in lower case. It's useful for example when you integrate with microsoft active directory where username is not case sensitive
 
 
 
system.login.username.lowercase=on
 
 
 
== Enable pdf to swf conversion ==
 
To enable preview UI tab, OpenKM need to convert pdf files to swf.
 
 
 
system.pdf2swf=/usr/bin/pdf2swf
 
 
 
== Enable open office service ==
 
Open office is used by OpenKM to convert files to pdf.
 
 
 
system.openoffice=on
 
 
 
== Configuring e-mail ==
 
To configuring e-mail service you must enable subscription and notification properties. View a complete example in [[E-Mail_configuration]].
 
 
 
subscription.message.subject=OpenKM - {0} - {1};
 
subscription.message.body=Document: <a href=\"{0}\">{1}</a>
 
notify.message.subject=OpenKM - NOTIFICATION - {0}
 
notify.message.body=Document: <a href=\"{0}\">{1}</a>
 
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]

Revision as of 19:03, 25 January 2010

You can modify some OpenKM default behavior.

  • repository.config: Specify the repository configuration file. This is an XML which describe the repository configuration. Here you can alter the FileSystem and PersistenceManage for Workspace and Versioning. By default set to "repository.xml". See Repository configuration for more info.
  • repository.home: This is the folder name where the repository data is stored, but this information depends on the configuration defined in "repository.xml" because the repository contents can be stored in disk or in a database. By default set to "repository".
  • principal.adapter: OpenKM use JAAS (Java Authentication and Authorization Service) to manage authentication. can handle user access using the JBoss org.jboss.security.auth.spi.DatabaseServerLoginModule login module by default. OpenKM needs an available method for reading users and roles. The class com.openkm.principal.DatabasePrincipalAdapter does this job. For more info, read http://jboss.org/community/docs/DOC-10760.
  • max.file.size: Defines the maximum size for a document. If the document size exceed this quantity, the application throws an FileSizeExceededException and the document won't be added to the repository. The size is measured in MB, so if you set this property to 25, the maximum document size will be 25 MB. By default set to 25.
  • restrict.file.mime: If you set this property to "on", only files with a registered MIME type are allowed to be added to the repository. If the file don't match any registered MIME type an UnsupportedMimeTypeException is thrown. The list of registered MIME type is defined in the file $JBOSS_HOME/server/default/deploy/OpenKM.war/WEB-INF/classes/com/openkm/core/mime.types. The changes in the file won't take effect until you restart the JBoss server. If you add a new MIME type, don't forget to add the corresponding icon at $JBOSS_HOME/server/default/deploy/OpenKM.war/com.openkm.frontend.Main/img/icon/mime. By default set to "off".
  • restrict.file.extension: This configuration parameter limit the files added using the WebDAV connector. The reason to add this configuration property is that many application create temporal or backup files while you edit a document using the WebDAV connector, and you don't want to add these "phantom" files to the repository. By default set to “*~,*.bak”.
  • max.search.results: To prevent heavy system load due to large search results, you can configure the maximum search results returned by a query. By default set to 25.
  • application.url: In subscriptions and notification messages an URL with the related document is included. Here you have to configure the URL used to access OpenKM from others computers. Notifications and subscriptions won't be available until this parameter is configured. This is a sample configuration: http://your-domain.com:8080/OpenKM/es.git.openkm.frontend.Main/index.jsp. By default set to null.
  • notify.message.body: Can be used to set the notification mail message body. See Notification and subscription messages for more info. By default set to "Document: <a href=\"{0}\">{1}</a>
    User: {3}
    Message:{4}
    ".
  • subscription.message.subject: Can be used to set the subscription mail message subject. See Notification and subscription messages for more info. By default set to "OpenKM - NOTIFICATION - {0}". subscription.message.body: Can be used to set the subscription mail message body. See Notification and subscription messages for more info. By default set to "Document:<a href=\"{0}\">{1}</a>
    User: {3}
    Event: {4}
    Comment: {5}
    ".
  • system.ocr: If you want to use an OCR you should put here the path to the application executable. Actually only works with Tesseract. See OCR for more info. By default set to "".
  • system.antivir: OpenKM can be configured to check an uploaded document for viruses. Here you can specify the path of the executable antivir. Actually only works with ClamAV. See Antivirus for more info. By default set to "".
  • system.readonly: To configure a read-only OpenKM instance. See Repository mirroring for more info. By default is set to "off".
  • system.openoffice: This parameter is used to enable / disable the integration with OpenOffice.org application. Should be set to "on" to enable the document to PDF conversion feature. See Third-party software integration: OpenOffice.orgfor more info. By default set to "off".
  • default.lang: Used to set the default OpenKM web interface language. By default set to english.