Install OpenKM on centos 5 / 6

On April 16, 2011, in Uncategorized, by nils

download the latest openkm from: http://sourceforge.net/projects/openkm/files/5.0/
unpack the content

heads up: execute all the following yum in one line:

</pre>
<em>cd /etc/yum.repos.d</em>
<em>wget http://www.linux-mail.info/files/dag-clamav.repo</em>
<pre>wget <a href="http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm">http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm</a>
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm</pre>
yum install  libjpeg-devel libpng-devel libtiff-devel zlib-devel gcc gcc-c++ make autoconf libtool automake openoffice.org* gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel ImageMagick amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql -y

install java:

download and install the …rpm.bin after executing the bin install the extracted rpms with “rpm -ihv *.rpm”

http://www.oracle.com/technetwork/java/javase/downloads/jre6-downloads-1637595.html

[root@dmsSrv Downloads]# alternatives --install /usr/bin/java java /usr/java/jre1.6.0_33/bin/java 2
[root@dmsSrv Downloads]# alternatives --config java</pre>
There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
 2 /usr/java/jre1.6.0_33/bin/java

Enter to keep the current selection[+], or type selection number: 2
[root@dmsSrv Downloads]# java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode) 

install tesseract ocr:

sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel gcc gcc-c++ make autoconf libtool automake -y
wget http://www.leptonica.com/source/leptonlib-1.67.tar.gz # updated to 168 now
tar -zxvf leptonlib-1.67.tar.gz
./configure && make && sudo make install
wget http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz # updated to 301 now
tar -zxvf tesseract-3.00.tar.gz
./autogen.sh && ./configure && make && sudo make install
cd /usr/local/share/tessdata
sudo wget http://tesseract-ocr.googlecode.com/files/deu.traineddata.gz
sudo gunzip deu.traineddata.gz
cd -

install openoffice.org:

yum install openoffice.org*
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

install swftools

wget http://www.swftools.org/swftools-0.9.1.tar.gz #0.9.2 is available
tar -zxvf swftools-0.9.1.tar.gz
sudo yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel -y
cd swftools-0.9.1
./configure && make && sudo make install
cd ..

install ImageMagick

sudo yum install ImageMagick
which convert #will tell you where it is.

install ClamAV

<em>cd /etc/yum.repos.d</em> && <em>wget http://www.linux-mail.info/files/dag-clamav.repo
</em>wget <a href="http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm">http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm</a>
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
sudo yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql
sudo sa-update
sudo chkconfig --levels 235 amavisd on
sudo chkconfig --levels 235 clamd on
sudo /usr/bin/freshclam
sudo /etc/init.d/amavisd start
sudo /etc/init.d/clamd start
sudo mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
sudo chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
sudo ln -s /var/run/clamav/clamd.sock /var/spool/amavisd/clamd.sock

configure JBoss for a secure connection

if not already done create a java ssl keystore:

%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA

and assign a password for the keystore uncomment the “SSL HTTP/1.1 Connector” element in ./jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml (around line 32) and add the xml attribute keystorePass=”changeme” to the Connector element. at the end it should look like:

        <!-- Define a SSL HTTP/1.1 Connector on port 8443          This connector uses the JSSE configuration, when using APR, the           connector should be using the OpenSSL style configuration          described in the APR documentation -->

the OpenKM.cfg should look like this now:

system.ocr=/usr/local/bin/tesseract
system.openoffice.server=http://localhost:8080/converter/convert
system.img2pdf=/usr/bin/convert
system.pdf2swf=/usr/local/bin/pdf2swf
system.antivir=/usr/bin/clamscan
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl=create
application.url=http://host:8080/OpenKM/com.openkm.frontend.Main/index.jsp
system.webdav.server=on
system.webdav.fix=on

be sure to change the hibernate.hbm2ddl value to “none” without quotes later

run OpenKM

bin/run -b 0.0.0.0 &

on the client side:

  • for windows use netdrive and if you want to connect via https to the webdav service, make sure that you go to advanced settings and check the “Use HTTPS” checkbox.
  • also please don’t use the port in the “Site IP or URL” field …

references

http://paramountideas.com/tesseract-ocr-30-and-leptonica-installation-centos-55-and-opensuse-113

http://www.betaquest.com/2010/08/how-to-install-swftools-0-9-1-on-centos-5-5/

http://wiki.openkm.com/index.php/WebDAV_access

http://stackoverflow.com/questions/4004456/centos-server-openoffice-headless

http://www.howtoforge.com/perfect-server-centos-5.5-x86_64-ispconfig-3-p6

http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html

Tagged with:
 

10 Responses to “Install OpenKM on centos 5 / 6”

  1. pankaj says:

    Thanks……

  2. Hatem says:

    Great work, Thanks for your effort.

  3. Greg says:

    I think there is problem with ImageMagick , it should not be installed by yum
    we need to install it by compile
    http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=18897

    Also since OpenKm 5.1.9 you neeed Change system.swftools.pdf2swf configuration property from “/usr/bin/pdf2swf” to “/usr/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}”

  4. nils says:

    thanks, i will add this note for ImageMagick.
    I think theses parameters for pdf2swf should come from the openkm code … i don’t know if this is a temporary workaround… i need to test this too.

  5. Syamsul says:

    Am glad to see this site back online :)
    Might you update this tutorial for CentOS 6 too?

Leave a Reply