Skip to content

Installation

Steps to install and configure Smart Forms in OpenKM v8.2:

  • Unzip the Smart Forms ZIP.
  • Create the database:
CREATE DATABASE smartforms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER 'smartforms'@'%' IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON smartforms.* TO 'smartforms'@'%' WITH GRANT OPTION;
  • Create the configuration file $TOMCAT_HOME/smart-forms.properties
# DataSource - MariaDB
spring.datasource.url=jdbc:mariadb://localhost:3306/smartforms?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
spring.datasource.username=smartforms
spring.datasource.password=smartforms
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
# OpenKM integration
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=choose-any-pass
  • Stop Tomcat, copy the smart-forms.war file to $TOMCAT_HOME/webapps (in the same Tomcat where OpenKM v8.2 is deployed) and start Tomcat again.
  • Create the database:
CREATE DATABASE smartforms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER 'smartforms'@'%' IDENTIFIED BY 'choose-any-pass';
GRANT ALL ON smartforms.* TO 'smartforms'@'%' WITH GRANT OPTION;
  • Create the configuration file $TOMCAT_HOME/smart-forms.properties
# DataSource - MariaDB
spring.datasource.url=jdbc:mariadb://localhost:3306/smartforms?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
spring.datasource.username=smartforms
spring.datasource.password=smartforms
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
# OpenKM integration
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=choose-any-pass
  • Create a database
DROP DATABASE IF EXISTS smartforms;
CREATE USER smartforms WITH PASSWORD 'choose-any-pass';
CREATE DATABASE smartforms WITH OWNER smartforms ENCODING 'UTF8';

Or use the command line.

Terminal window
$ createuser --pwprompt smartforms
$ createdb --owner=smartforms --encoding=UTF8 smartforms
  • Create the configuration file $TOMCAT_HOME/smart-forms.properties
# DataSource - PostgreSQL
spring.datasource.url=jdbc:postgresql://localhost:5432/smartforms
spring.datasource.username=smartforms
spring.datasource.password=smartforms
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
# OpenKM integration
openkm.rest.url=http://localhost:8080/openkm
openkm.rest.user=okmAdmin
openkm.rest.password=choose-any-pass