Quick installation and upgrade overview

This chapter gives a brief overview of the installation or upgrade of an iKnowBase instance.

The process typically have the following steps:

We recommend that you use the procedure above even if you intend to install the web application info a third party application server, proceeding with the third party server only when the iKnowBase web server has been verified.

Recommended directory structure

We recommend that you choose a server for storing the iKnowBase software and running the installation. In most scenarios this server would be a server where the web applications will run. Here, install into a directory structure similar to the one below, with one directory for each version the actual distribution (named after the distribution version) and one directory for each iknowbase installation (each database repository):

Directory Purpose
/opt/iknowbase Root for all iKnowBase software
.../distributions Collection of all distribution files, packed
.../iknowbase-6.4 Version specific directory for the unpacked software (old version)
.../iknowbase-7.0.4 Version specific directory for the unpacked software (current version)
.../development Directory for a given instance (example: “development”)
.../development/plugins Directory containing all .jar/.war plugins
.../development/wars Directory containing all instance specific built wars (.war file or exploded war)
.../production Directory for a given instance (example: “production”)
.../production/plugins Directory containing all .jar/.war plugins
.../production/wars Directory containing all instance specific built wars (.war file or exploded war)

Download and install the iKnowBase software

Using the recommended directory structure above, install the iKnowBase software into the proper location. The assumption here is that the distribution file has been downloaded to /tmp.

$ su -
# mkdir /opt/iknowbase
# chown iknowbase /opt/iknowbase
# exit
$ mkdir /opt/iknowbase/distributions
$ cd /opt/iknowbase/distributions
$ cp /tmp/iknowbase-7.0.4-bin.zip /opt/iknowbase/distributions/

# Note: the .zip-file contains top level directory "iknowbase-7.0.4"
$ cd /opt/iknowbase
$ unzip distributions/iknowbase-7.0.4-bin.zip

Prepare the instance-specific home directory and configuration

You will typically have multiple iKnowBase repositories, to handle different phases in the life cycle, such as development, testing and production. We recommend that you set up a directory for each such repository, where you store configuration files, log files, etc. This chapter describes setting up only one such instance, so you should repeat this for e.g. development, test and production.

$ mkdir /opt/iknowbase/production

For simplicity, and to avoid accidentally using the wrong version of the iKnowBase program, we also recommend creating a “iknowbase.sh” script that forwards to the proper version. Run the script below from each of the instance-specific directories:

# Run the following lines including line starting with "EOF" all in one comman
$ cd /opt/iknowbase/production
$ cat > iknowbase.sh << 'EOF'
#!/bin/bash
../iknowbase-7.0.4/iknowbase.sh $*
EOF

$ chmod +x iknowbase.sh

For each repository, create a property file with all the required settings for connecting to the database and running the iKnowBase web server. We recommend naming the property file after the repository instance (“production.properties”), but you may choose any name you want. A sample is provided in etc/SAMPLE.properties in the distribution. Copy the sample, edit the new file and set proper values for db.URL, db.sysPassword, db.ikbUser and db.ikbPassword.

$ cp ../iknowbase-7.0.4/etc/SAMPLE.properties production.properties

Note that the db.sysUser and db.sysPassword is only required during installation, and may be removed during normal execution, if that is required.

A minimal file for repository creation and configuration could look like this:

# Database connection information
db.URL = jdbc:oracle:thin:@//localhost:1521/orcl
db.ikbUser = ikb_prod
db.ikbPassword = SECRETPASSWORD
db.sysUser = sys
db.sysPassword = SECRETPASSWORD 

Install or upgrade the database repository

To install a fresh iKnowBase repository, run the following steps:

1. Create user and import schema content

$ cd /opt/iknowbase/production
$ ./iknowbase.sh production.properties createUser
$ ./iknowbase.sh production.properties uploadFile ../iknowbase-7.0.4/etc/IKB_MASTER_70.dmp
$ ./iknowbase.sh production.properties importFile IKB_MASTER_70.dmp IKB_MASTER_70

2. Optionally download and display import log

$ ./iknowbase.sh production.properties downloadFile IKB_MASTER_70.log .
$ cat IKB_MASTER_70.log

3. Run upgrade scripts on the newly created installation

$ ./iknowbase.sh production.properties upgradeAll

4. Set password for ORCLADMIN, so that you may log in with the default security setup on the iKnowBase web server (replace the example password “changeMe” with one of your own choosing):

$ ./iknowbase.sh production.properties setIkbPassword orcladmin changeMe

To upgrade an existing iKnowBase repository, run the following steps instead:

$ ./iknowbase.sh production.properties exportSource source.zip
$ ./iknowbase.sh production.properties configureUser
$ ./iknowbase.sh production.properties upgradeAll

If you have any custom scripts that need to run, for example to grant permissions to custom code, run these now.

Create an instance specific web application containing all plugins and patches

Optional step if you need to apply any .jar / .war patches or add .jar / .war plugins.

NOTE: iKnowBase Process Studio is distributed as a plugin and is NOT installed by default. Add it in this step if you want to use iKnowBase Process Studio.

First create the instance directories

$ mkdir /opt/iknowbase/production/plugins
$ mkdir /opt/iknowbase/production/wars

Add all .jar/.war plugins and patches to the plugins directory.

Create an instance specific web application: original iKnowBase web application + all plugins:

$ cd /opt/iknowbase/production
$ ./iknowbase.sh production.properties assembleWar ../iknowbase-7.0.4/wars/iknowbase-webapp-7.0.4.war ./wars/iknowbase-webapp-7.0.4-custom.war ./plugins/*

We recommend always patching from the original application as this ensures you know which plugins you’ve added at all times.

Deploy the newly created iKnowBase web application instead of the original web application. See application server specific chapter for deployment details of custom applications.

Start the iKnowBase application

With the database repository in place, you can run the iKnowBase web applications. There are two main alternatives: Either use the iKnowBase web server, or deploy to one of the supported application servers.

To run the iKnowBase web server, use:

$ cd /opt/iknowbase/production
$ ./iknowbase.sh production.properties webServer

Next steps

Generic Java applications chapter:

Application server specific chapters: