Thursday, December 17, 2015

OpenKM Setup for Windows - Startup Problem Solving


If you encounter startup problem after installing OpenKM for windows, try to follow the action in this video.





It an issue of memory allocations in ,,,,/tomcat/bin/setenv.bat

Try to set the MaxPermSize to bigger...  In the video, I change it to 5120, it works...

Friday, June 26, 2015

OpenKM Setup from Scratch on Ubuntu Server 14.04

First I am not an expert, but want to share my experience and hope you all can get shorter to your KM goal.  So please forgive me if any stupid thing did here and mistakes found...

After studying the OpenKM for a couple weeks, I have successfully to setup the OpenKM on a total new installed Ubuntu Server only using the OpenKM's configuration files and the WAR.

My Target:
1. Deploy OpenKM with only a WAR file on New Installed Ubuntu/Tomcat
2. Implement MySQL instead of HSQL
3. Implement all preview functions for PDFs/Office Documents/Image/Videos...
4. Implement the anti-virus function

Detail Setup Guide:
Step 1 - OS Setup



Step 2 - OS Network Configuration




Step 3 - SSH Client with Putty




Step 4 - OpenKM Setup (NOTE: typing mistakes in video MySQL5InnoDBDialect during setup OpenKM.cfg)





Step 5 - OpenKM Testing





Finished!!!


(you can get the following notes for the videos, with it you can copy/paste commands simply for your personal trial.  Of course, remember to change my name to your name... haha..., Enjoy it.!!!)

Notes for OpenKM Installation on Ubuntu

Step 1 - OS Setup

Follow the wizard and remember to Select install “OpenSSH” only


Step 2 - OS Network Configuration

$ sudo bash
# vi /etc/network/interfaces
iface eth0 inet static
address 188.4.72.198
network 255.255.255.0
gateway 188.4.72.231

# /etc/resolvconf/resolv.conf.d/base
nameserver 188.4.72.16
nameserver 188.4.72.7

# resolvconf -u



Step 3 - OpenKM Setup

Installing MySQL Server
# apt-get install mysql-server

after that it will prompt you to input the Master password for MYSQL server (input and REMEMBER IT……)

Installing Tomcat7 Server
# apt-get install libtcnative-1 libtomcat7-java tomcat7 tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples tomcat7-user

# apt-get install unzip
# wget http://liquidtelecom.dl.sourceforge.net/project/openkm/6.3/openkm-6.3.0-community-tomcat-bundle.zip

# unzip openkm-6.3.0-community-tomcat-bundle.zip


Configuration MySQL Server (Optional)

# vi /etc/mysql/my.cnf and


under [mysqld] section in your ini file, add:

    default-storage-engine = innodb




Check if your MySQL installation has InnoDB engine enabled:


# service mysql restart

# mysql -h localhost -u root -p
mysql> show engines;

and continue create OpenKM db in mysql tool (remember to change your password)

CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
CREATE USER openkm@localhost IDENTIFIED BY 'okmtest123';
GRANT ALL ON okmdb.* TO openkm@localhost WITH GRANT OPTION;



Build some Links
# ln -s /var/lib/tomcat7/common /usr/share/tomcat7/common
# ln -s /var/lib/tomcat7/server /usr/share/tomcat7/server
# ln -s /var/log/tomcat7 /usr/share/tomcat7/logs
# ln -s /var/lib/tomcat7/repository /usr/share/tomcat7/repository
# ln -s /etc/tomcat7 /usr/share/tomcat7/conf


Preparing OpenKM.cfg
# cp /home/kevinchui/tomcat/OpenKM.cfg /usr/share/tomcat7

modify the line in file /usr/share/tomcat7/OpenKM.cfg (note that in the video, it was wrongly typed as "i" which should be capitalized in MySQL5InnoDBDialect)
    hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
    hibernate.hbm2ddl=create


Preparing OpenKM.xml, PropertyGroups

# cp /home/kevinchui/tomcat/OpenKM.xml /usr/share/tomcat7
# cp /home/kevinchui/tomcat/PropertyGroups.xml /usr/share/tomcat7


Preparing setenv.sh (Environment Setting)
# cp /home/kevinchui/tomcat/bin/setenv.sh /usr/share/tomcat7/bin

Remark the line in file /usr/share/tomcat7/bin/setenv.sh
        #CATALINA_PID=$CATALINA_HOME/catalina.pid


Preparing lib for OpenKM

# cp /home/kevinchui/tomcat/lib/javassist-*.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/jstl-1.2.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/jta-1.1.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/log4j-1.2.17.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/log4j-initializer.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/mail-1.*.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/mysql-connector-java-5.1.12-bin.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/tomcat-juli-adapters.jar /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/unicode.ttf /usr/share/tomcat7/lib
# cp /home/kevinchui/tomcat/lib/sigar /usr/share/tomcat7/lib/sigar -R
# cp /home/kevinchui/tomcat/lib/hsqldb.jar /usr/share/tomcat7/lib/

Preparing log4j configuration
# cp /home/kevinchui/tomcat/conf/log4j.properties /etc/tomcat7



Configurating context.xml

# vi /etc/tomcat7/context.xml
find the follwing line
        WEB-INF/web.xml
and add the following lines after it
        
        


Configurating server.xml
# vi /etc/tomcat7/server.xml
find the follwing line
   
and add the following lines after it
   
   

then find the follwing line
   
and add the following 7 lines after it
          maxActive="100" maxIdle="30" maxWait="10000" validationQuery="select 1"
          username="openkm" password="okmtest123" driverClassName="com.mysql.jdbc.Driver"
          url="jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"/>

            mail.smtp.host="localhost" mail.from="testing@openkm.com"/>


then find and Modify the line
FROM:
   

 TO:
   



Set directories privileges
# chown tomcat7.tomcat7 /usr/share/tomcat7 /var/lib/tomcat7 /etc/tomcat7/* -R


Deploying OpenKM.war
# service tomcat7 stop
# cp /home/kevinchui/tomcat/webapps/OpenKM.war /var/lib/tomcat7/webapps/


Implement the rest
# apt-get install libreoffice imagemagick clamav clamav-daemon

Update the Virus Definitions
# freshclam

Prepareing SWFTOOLS
# cp /home/kevinchui/tomcat/bin/pdf2swf /usr/bin


Start TOMCAT server
# service tomcat7 start



OpenKM additional Configurations for Preview/Antivirus
Login OpenKM -> Administration -> Configuration and set the followings.

system.openoffice.path
/usr/lib/libreoffice

system.imagemagick.convert
/usr/bin/convert

system.swftools.pdf2swf
/usr/bin/pdf2swf -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}

system.webdav.fix
true
system.webdav.server
true

system.ghostscript.ps2pdf
/usr/bin/pdf2swf

system.antivir
/usr/bin/clamscan

application.url
http://188.4.72.198:8080/OpenKM/index.jsp



The last step: Logout OpenKM and restart tomcat server
# service tomcat7 restart




Saturday, September 20, 2014

ZeroShell - A Wonderful Firewall Solution

Recently, I am searching a software with Captive Portal Service.  After surfing the web, I got the Zeroshell.    Very surprising, it comes with tones of features that I want to implement on a network with better management.  Like Lan2Lan VPN, Bandwidth Control and Balancing, QoS, Human readable logging...  All are great.  If you are facing plenty daily problem originated from Network management, take a look here. http://www.zeroshell.org/.
 

Tuesday, July 14, 2009

error while loading shared libraries: libgnome-desktop-2.so.2: cannot open shared object file: No such file or directory

I used Lotus Client 8.5 beta at Ubuntu 8.0.4 fine.  However, I cannot open attachment with Lotus Client 8.5 at Ubuntu 9.0.4.  And got the following messages.

kevinchui@kevin-nb:~$ /opt/ibm/lotus/notes/framework/../notes
07/13/2009 AM 10:01:03.06 [05197:00002--1270666848] DeskClientOpenInt> Calling CreateProgramRCP pszRCPCmdLine[/authenticate ] bDeskProvisioningRestart [0]
07/13/2009 AM 10:01:03.08 [05197:00002--1270666848] DeskClientOpenInt> Executed CreateProgramRCP

2009/07/13 10:01:05.075 CONFIG eclipse.buildId=client_620_20081114-0851
java.fullversion=J2RE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260ifx-20081002_23977 (JIT enabled, AOT enabled)
J9VM - 20081002_023977_lHdSMr
JIT  - r9_20080415_1520ifx7
GC   - 20080415_AA
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_HK
Framework arguments:  -dir ltr -NPARAMS "/authenticate" -RPARAMS -personality com.ibm.rcp.platform.personality -product com.ibm.rcp.personality.framework.RCPProduct:com.ibm.notes.branding.notes -plugincustomization /opt/ibm/lotus/notes/framework/rcp/plugin_customization.ini
Command-line arguments:  -os linux -ws gtk -arch x86 -dir ltr -NPARAMS "/authenticate" -RPARAMS -personality com.ibm.rcp.platform.personality -product com.ibm.rcp.personality.framework.RCPProduct:com.ibm.notes.branding.notes -data /home/kevinchui/lotus/notes/data/workspace -plugincustomization /opt/ibm/lotus/notes/framework/rcp/plugin_customization.ini ::class.method=com.ibm.rcp.core.internal.logger.frameworkhook.writeSession() ::thread=Start Level Event Dispatcher ::loggername=com.ibm.rcp.core.internal.logger.frameworkhook
(pid 5197 ) X lib error (3:BadWindow (invalid Window parameter)) occurs
<span style="font-weight: bold;">/opt/ibm/lotus/notes/framework/../openwith: error while loading shared libraries: libgnome-desktop-2.so.2: cannot open shared object file: No such file or directory</span>

The Solution is very simple: Make a symbolic link to lead it find the library file
# cd /usr/lib
# ln -s libgnome-desktop-2.so.11 libgnome-desktop-2.so.2

P.S. libgnome-desktop-2.so.11 can be various from your library version, try to locate it yourself at /usr/lib

Lotus Notes Client 8.5 on Ubuntu 9.0.4 - Strange Font Size Problem

If you found that the displaying fonts and window sizes are strange using Lotus Notes Client 8.5 on Ubuntu 9.0.4, try to install the following packing.  It works, at least, for me.

# sudo apt-get install ttf-xfree86-nonfree

Monday, July 21, 2008

Cannot start sqlldr or sqlplus

When I start sqlldr and got the following message:

#/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlldr dtradeuser/dmstest errors=999999 control=/var/mail2/dms.ctl

Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No
message file for product=RDBMS, facility=UL


To fix it, setup the environment variables

# export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
# export ORACLE_SID=XE

Sunday, July 20, 2008

Enable / Disable Beep on Ubuntu

Every defaults setup in Ubuntu are good except the disturbing beep sound... oh! It can been disabled with a simple command line.

disable beep sound in Ubuntu

# sudo modprobe -r pcspkr

enable beep sound in Ubuntu

# sudo modprobe pcspkr