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 quickstart installation 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-6.7 Version specific directory for the unpacked software (current version)
.../development Directory for a given instance (example: “development”)
.../development/custom-resources “development” instance customer specific static files (.js, .css, ...)
.../production Directory for a given instance (example: “production”)
.../production/custom-resources “production” instance customer specific static files (.js, .css, ...)

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-6.7-bin.zip /opt/iknowbase/distributions/

# Note: the .zip-file contains top level directory "iknowbase-6.7"
$ cd /opt/iknowbase
$ unzip distributions/iknowbase-6.7-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
$ mkdir /opt/iknowbase/production/custom-resources

For simplicity, and to avoid accidentally using the wrong version of the quickstart program, we also recommend creating a “quickstart.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 > quickstart.sh << 'EOF'
#!/bin/bash
../iknowbase-6.7/quickstart.sh $*
EOF

$ chmod +x quickstart.sh

For each repository, create a property file with all the required settings for connecting to the database and running the embedded 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-6.7/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
$ ./quickstart.sh production.properties createUser
$ ./quickstart.sh production.properties uploadFile ../iknowbase-6.7/etc/IKB_MASTER_67.dmp
$ ./quickstart.sh production.properties importFile IKB_MASTER_67.dmp IKB_MASTER_67

2. Optionally download and display import log

$ ./quickstart.sh production.properties downloadFile IKB_MASTER_67.log .
$ cat IKB_MASTER_67.log

3. Run upgrade scripts on the newly created installation

$ ./quickstart.sh production.properties upgradeAll

4. Set password for ORCLADMIN, so that you may log in with the default security setup on iKnowBase Quickstart (choose your own password...)

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

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

$ ./quickstart.sh production.properties exportSource source.zip
$ ./quickstart.sh production.properties configureUser
$ ./quickstart.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.

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 embedded iKnowBase web server “iKnowBase Quickstart”, or deploy to one of the supported application servers.

To run the iKnowBase Quickstart application server, use:

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

Generic Java applications chapter:

Application server specific chapters: