• Guide for installing OpenKM on linux --incl. working preview

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #24381  by wgerven
 
Hello everybody,

I am using OpenKM community to structure my own documents and information that I acquire daily. As it took me quite some time to figure out how to make everything work (99% of that was the previsualization), and as I also benefitted quite much from this forum and its helpful people, I wanted in return to post here the personal documentation I wrote which gave me a working installation of OpenKM (which in retrospect is not that difficult). I hope this is to the benefit of future users (who may want to use OpenKM for private use). I must say to th developers: It is a beautiful piece of software :!:

These notes were tested on Ubuntu linux 13.04, 64bit & OpenKM 6.2.4 community.

One thing is important to mention regarding previewing. If you are like me and just randomly upload a document and start clicking some tabs (including "preview"), then be aware that this can screw you up later. I found out that if you click the preview tab, before the whole previzualization is enabled in the right way/order in the configuration file, this will create corrupted documents in the cache folder. These corrupted documents will sit in this folder and make it seem in turn as if previzualization is not working and give random errors, while in fact it may work fine. This makes one frustrated and then you start indeed changing things in the config that corrupt previzualisation... If it happens that preview doesn't work, while you are sure you found all the right binaries and pointed OpenKM to them in the right way, first clean the folders inside the /tomcat/cache, restart the server and try it again. Good chances are that suddenly all works fine!

Installation of OpenKM 6.2.x

1. Disclaimer: This is what worked from a clean linux installation.

2. First make sure that Oracle Java Development Kit (JDK, which includes JRE [runtime environment]) version 1.6 or higher is installed properly. For this, follow the instructions here: http://askubuntu.com/questions/55848/ho ... java-jdk-7. These instructions include enabling the browser support for JRE in firefox.

3. Test if the JRE browser integration works at http://www.javatester.org or directly at the java website.

4. Install Adobe Flashplayer. At the moment of writing (July 25, 2013), this was possible by running
Code: Select all
$ sudo apt-get install flashplugin-installer
I found that OpenKM also works trough the pepper plugin in Chrome/Chromium.

5. Get the .run installer from the openKM site and install.

6. Reboot, otherwise the server won't launch.

7. After launching the server (there should be a desktop icon for this [start openKM]), openKM can now be accessed trough http://localhost:8080/OpenKM/

Making previewing work

1. Assuming that libreoffice came with the distribution (in my case Ubuntu 13.04), the first thing we want to test is whether the feature to download a document as pdf is supported. If this feature works, this means that the libreoffice integration (which is needed for general document preview by pdf2swf) is successful.

2. We have to locate soffice.bin In the case of the fresh ubuntu installation, it was found to be in
Code: Select all
/usr/lib/libreoffice/program
In the administration/configuration tab, go to system.openoffice.path, give it the value /usr/lib/libreoffice. OpenKM then understands that there it is that /program/soffice.bin is to be found. This can be checked by pressing the green check mark at the top of the page!

3. Next restart the server and come back to OpenKM.

4. Upload an (open)office document, and then use the feature to download it as pdf. If this works then we are safe and the libreoffice integration with OpenKM has succeeded.

5. Next we enable pdf2swf conversion for the build-in previewer. The application pdf2swf can be found in the OpenKM folder itself, which in this case was /home/username/OpenKM-6.2.4/tomcat/bin/pdf2swf. Enter in the configuration entry system.swftools.pdf2swf the following string:
Code: Select all
path_to_openkm_folder/tomcat/bin/pdf2swf -T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut}
6. Restart the server.

7. Previewing should now be working. If at this point suddenly there are difficulties downloading documents as pdf, while preview doesn't work, this most probably means there is a corrupted document in the /tomcat/repository/cache folder which needs to be cleaned then. These documents can end up there whenever “preview” was pressed before correctly integrating OpenKM with pdf2swf!

8. A good test at this point is also to download an office document as pdf, to upload the pdf and then to see whether this pdf previews.

9. Next install imagemagick from the repositories, and locate the “convert” binary. It should be in the folder /usr/bin. If so, add /usr/bin/convert to system.imagemagick.convert.

10. To enable postscript previewing check if the ghostscript package is installed, if so, you should find ps2pdf in /usr/bin.

11. This should be it.

Optional WebDAV support

1. Install connector:
Code: Select all
$ sudo apt-get install davfs2
2. Make a mount point
Code: Select all
mkdir ~/mountpoint
3. And mount:
Code: Select all
$ sudo mount.davfs "http://localhost:8080/OpenKM/webdav" ~/mountpoint
4. Then add in /etc/fstab
Code: Select all
http://localhost:8080/OpenKM/webdav /home/username/mountpoint davfs noauto,user,rw 0 0
5. Create secrets file in your home:
Code: Select all
$ mkdir ~/.davfs2/
$ echo "http://localhost:8080/OpenKM/webdav webdavuser webdavpassword" >> ~/.davfs2/secrets 
$ chmod 0600 ~/.davfs2/secrets
That's it, I hope other people will benefit from this! :wink:
Best regards,

Willem.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.