For months I was searching for a system capable to track and store out internal documents. I tested several systems like alfresco, opendocman,…..
In the end I decided to give OpenKM a try.
OpenKM runs on a JBoss application server, so you are bound to Java. They use Jackrabbit for their hierarchical content storage. The frontend is realized with GWT (Google Web Tollkit).
For a full feature list click here.
OpenKM install hints:
I installed OpenKM on a recent Debian 6.0
Getting .pdf, .docx, .xlsx preview running:
First you need to install OpenOffice. Make sure you install …-math, …-writer, … -draw, …-calc packages.
OpenOffice hast to bee run in headless mode. I use following startup script:
11 | PIDFILE=/var/run/openoffice-server.pid |
15 | if [ -f $PIDFILE ]; then |
16 | echo "OpenOffice headless server has already started." |
20 | echo "Starting OpenOffice headless server" |
21 | soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard & > /dev/null 2>&1 |
25 | if [ -f $PIDFILE ]; then |
26 | echo "Stopping OpenOffice headless server." |
27 | killall -9 soffice && killall -9 soffice.bin |
31 | echo "Openoffice headless server is not running." |
35 | echo "Usage: $0 { start | stop }" |
To get the preview stuff working you need also pdf2swf. Check your /bin directory there should be a pdf2swf executable or if you prefer you could take the swftool package from ubuntu.
The last step to get the previewer feature running is to set the corresponding config. flags at the OpenKm.cfg file.
- system.pdf2swf=/usr/bin/pdf2swf
Mail Notification configuration:
Mail notification is straight forward. Go to /opt/OpenKM-4.1_JBoss-4.2.3.GA/server/default/deploy/mail-service.xml . Edit the section to your needs.
If you face the problem that the links in your notification mails are pointing to localhost, you can alter the application.url flag in your OpenKM.cfg.
- application.url={yourURL}:{yourPort}/OpenKM/es.git.openkm.frontend.Main/index.jsp
Changing from port 8080 -> 80
GoTo /opt/OpenKM-4.1_JBoss-4.2.3.GA/server/default/deploy/jboss-web.deployer/server.xml and edit
Change the port field to 80.
Securing your JBoss
One last thing needs to be done :-). Security! Holy Moly… what… yep.. Jboss runs out of the box like an open barn door. So a good idea would be to secure the jmx-console and web-console stuff. Because of that the jmx-console and web-console are standard servlets you can protect them very easily via enabling the security-constraint.
Securing the jmx-console:
1. Edit \server\default\deploy\jmx-console.war\WEB-INF\web.xml and uncomment the security-constraint section:
12 | < web-resource-collection > |
13 | < web-resource-name >HtmlAdaptor</ web-resource-name > |
14 | < description >An example security config that only allows users with the |
15 | role JBossAdmin to access the HTML JMX console web application |
17 | < url-pattern >/*</ url-pattern > |
18 | < http-method >GET</ http-method > |
19 | < http-method >POST</ http-method > |
20 | </ web-resource-collection > |
22 | < role-name >JBossAdmin</ role-name > |
24 | </ security-constraint > |
27 | < auth-method >BASIC</ auth-method > |
28 | < realm-name >JBoss JMX Console</ realm-name > |
32 | < role-name >JBossAdmin</ role-name > |
2. Edit \server\default\deploy\jmx-console.war\WEB-INF\jboss-web.xml. Uncomment the following section:
7 | < security-domain >java:/jaas/jmx-console</ security-domain > |
3. Edit \server\default\conf\props\jmx-console-roles.properties file
4. Edit \server\default\conf\props\jmx-console-users.properties file
5. Edit \server\default\conf\login-config.xml edit following section
props/web-console-users.properties
props/web-console-roles.properties
6. under \server\default\conf\props\ copy and rename the two jmx-console-xx to web-console-xx.
Automatically start OpenKM (Jboss) via init scripts:
If you want to start your OpenKM automatically at boot time you can use this init script:
14 | JBOSS_START_SCRIPT=/opt/OpenKM-4.1_JBoss-4.2.3.GA/bin/run.sh |
15 | JBOSS_STOP_SCRIPT=/opt/OpenKM-4.1_JBoss-4.2.3.GA/bin/ shutdown .sh |
17 | $TEST -x $JBOSS_START_SCRIPT || exit 0 |
18 | $TEST -x $JBOSS_STOP_SCRIPT || exit 0 |
21 | $ECHO "Starting JBoss OKM." |
22 | rm -rf /path/to/server/default/tmp |
23 | rm -rf /path/to/server/default/work |
24 | rm -rf /path/to/server/default/log |
25 | su -l -c "$JBOSS_START_SCRIPT -b 0.0.0.0 > /dev/null 2> /dev/null &" |
30 | $ECHO "Stopping JBoss OKM. " |
31 | su -l -c "$JBOSS_STOP_SCRIPT -S > /dev/null &" |
49 | $ECHO "Usage: jbossokm {start|stop|restart}" |
Shutdown problems (network unreachable exception)
If you get an exception at shutdown or your shutdown script does not kill your JBoss then you could check sysctl-setting under /etc/sysctl.d/bindv6only.conf.
Make sure that the net.ipv6.bindv6only=0. !
If you would like to show your appreciation consider to support the guys from OpenKM with a donation 
See PayPal subscription link at the bottom of the page