Sunteți pe pagina 1din 6

Technical Document for OpenKM

1. Hadware Requirement

The below requirement need to install OpenKM on a virtualized server with Less than 50
users, repository size 20-50GB.

• 1GB RAM
• Due Core 2 ( 1.86 GHz )
• 80-100 SATA hard disk.

Supported Operating systems

• GNU Linux (Ubuntu / Debian / SuSE / Red Hat ) - Recommended


• Windows XP, Vista, 2003 Server
• Solaris
• Mac OS

2. Installation Proses

This installation done on Ubuntu 9.10

a. Install Java JDK 1.6

Execute on terminal the command


$ sudo aptitude install sun-java6-jdk

b. Install Openoffice headless and run as sevice

Execute on terminal the command


$sudo apt-get install openoffice.org-headless

Created file oo.sh with command


#sudo vi /etc/init.d/oo.sh ( see attachment file oo.sh)

Change the permissions to this file


chmod 0755 /etc/init.d/oo.sh

Install oo.sh init script links


update-rc.d oo.sh defaults

Start the service:


/etc/init.d/./oo.sh start
You can see if openofice is running with this command:
netstat -nap | grep office

You should get something like this:


tcp 0 0 127.0.0.1:8100 0.0.0.0:*
LISTEN 2467/soffice.bin

c. Install Swftools

Execute on terminal the command


$sudo apt-get install swftools

d. Install OpenKM

Download OpenKM 4.0 + JBoss 4.2.3.GA bundle and uncompress on your file system
disk under /opt/).
Execute on terminal the command
$ tar -xvf OpenKM-4.0-JBoss-4.2.3.GA.zip

Edit Configuration file OpenKM.cfg


$vi opt/jboss-4.2.3.GA/OpenKM.cfg
Add the below script
system.openoffice=on
system.pdf2swf=/usr/bin/pdf2swf

Created file jboss.sh with command


#sudo vi /etc/init.d/jboss ( see attachment file jboss)

Change the permssions to this file


#sudo chmod 0755 /etc/init.d/jboss

Install jboss.sh init script links


$sudo update-rc.d jboss defaults

Start the service:


$sudo /etc/init.d/./jboss start

Open on a client browser the URL http://eobnms:8080/OpenKM/.


Autenticate to OpenKM using user "okmAdmin" with password "admin".

3. Back up

The below list file and folder need to backup


• /opt/jboss-4.2.3.GA (The folder is as OpenKM file and data).
• /etc/init.d/jboss.sh
• /etc/init.d/oo.sh

The back up is following regular back from system backup Ecogreen.

4. Recovery

to do a full restore in the following steps need;

a. restore all folder ad files has been back up at the point 3


b. do the step a, b and c at the point 2
c. Create jboss as service ($sudo update-rc.d jboss.sh defaults)
d. Start service ($sudo /etc/init.d/./jboss.sh start)

to restore some missing files do the following steps;

a. restore folder /opt/jboss-4.2.3.GA to your home directory


b. Change OpenKM port by editing by server.xml file
$vi /home_user/jboss-4.2.3.GA/server/default/deploy/jboss-
web.deployer/server.xml
Find the below script;

<Connector port="8080" address="${jboss.bind.address}"


maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
nableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />

Change “8080” to “8081”


c. Execute the below command
$/home_user//jboss-4.2.3.GA/bin/run.sh –b 0.0.0.0
d. Access from browser Http://eobnms01:8081/openKM
Attachment OO.sh
#!/bin/bash
#openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
#
OOo_HOME=/usr/lib/openoffice/program
SOFFICE_PATH=$OOo_HOME/soffice
PIDFILE=/var/run/openoffice-server.pid

set -e

case "$1" in
start)
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
sleep 5
exit
fi
echo "Starting OpenOffice headless server"
$SOFFICE_PATH -headless -nologo -nofirststartwizard
-accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
touch $PIDFILE
;;
stop)
if [ -f $PIDFILE ]; then
echo "Stopping OpenOffice headless server."
killall -9 soffice && killall -9 soffice.bin
rm -f $PIDFILE
exit
fi
echo "Openoffice headless server is not running."
exit
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Attachment jboss

#d: jboss_init_redhat.sh 60992 2007-02-28 11:33:27Z dimitris@jboss.org $


#
# JBoss Control Script
#
# To use this script run it as root - it will switch to the specified user
#
# Here is a little (and extremely primitive) startup/shutdown script
# for RedHat systems. It assumes that JBoss lives in /usr/local/jboss,
# it's run by user 'jboss' and JDK binaries are in /usr/local/jdk/bin.
# All this can be changed in the script itself.
#
# Either modify this script for your requirements or just ensure that
# the following variables are set correctly before calling the script.

#define where jboss is - this is the directory containing directories log, bin,
conf etc
JBOSS_HOME=${JBOSS_HOME:-"/opt/jboss-4.2.3.GA"}

#define the user under which jboss will run, or use 'RUNASIS' to run as the
current user
JBOSS_USER=${JBOSS_USER:-"RUNASIS"}

#make sure java is in your path


JAVAPTH=${JAVAPTH:-"/usr/lib/jvm/java-6-openjdk/bin"}

#configuration to use, usually one of 'minimal', 'default', 'all'


JBOSS_CONF=${JBOSS_CONF:-"default"}

#if JBOSS_HOST specified, use -b to bind jboss services to that address


JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b 0.0.0.0"}

#define the classpath for the shutdown class


JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}

#define the script to use to start jboss


JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -b 0.0.0.0"}
#-c $JBOSS_CONF $JBOSS_BIND_ADDR"}

if [ "$JBOSS_USER" = "RUNASIS" ]; then


SUBIT=""
else
SUBIT="su - $JBOSS_USER -c "
fi

if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then


# ensure the file exists
touch $JBOSS_CONSOLE
if [ ! -z "$SUBIT" ]; then
chown $JBOSS_USER $JBOSS_CONSOLE
fi
fi

if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then


echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
echo "WARNING: ignoring it and using /dev/null"
JBOSS_CONSOLE="/dev/null"
fi
#define what will be done with the console log
#JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"$JBOSS_HOME/server/default/log/console.log"}

JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"


JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JAVAPTH/java -classpath $JBOSSCP
org.jboss.Shutdown --shutdown"}

if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then


export PATH=$PATH:$JAVAPTH
fi

if [ ! -d "$JBOSS_HOME" ]; then
echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
exit 1
fi

echo JBOSS_CMD_START = $JBOSS_CMD_START

case "$1" in
start)
cd $JBOSS_HOME/bin
if [ -z "$SUBIT" ]; then
eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
else
$SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
fi
;;
stop)
if [ -z "$SUBIT" ]; then
$JBOSS_CMD_STOP
else
$SUBIT "$JBOSS_CMD_STOP"
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|help)"
esac

Notes:

To enable javascript Copy to Clipboard buttons on Firefox and Mozilla, enter the
following line into browser address bar: \"about:config\"

The list of preferences should open in browser window. Click right mouse button
somewhere in active part of preference list window and choose New > Boolean option
from context menu. Paste the following Preference name into the New boolean value
window input box: \"signed.applets.codebase_principal_support\"