{"id":518,"date":"2010-07-08T08:18:27","date_gmt":"2010-07-08T06:18:27","guid":{"rendered":"http:\/\/blog.fh-kaernten.at\/wehr\/?p=518"},"modified":"2011-02-11T10:30:17","modified_gmt":"2011-02-11T09:30:17","slug":"openkm-our-new-document-management-system-nice","status":"publish","type":"post","link":"https:\/\/blog.fh-kaernten.at\/wehr\/2010\/07\/08\/openkm-our-new-document-management-system-nice\/","title":{"rendered":"OpenKM our new Document Management System, nice&#8230;.."},"content":{"rendered":"<p id=\"top\" \/>\n<p>For\u00a0months I was searching for a system capable to track and store out internal documents. I tested several systems like <a href=\"http:\/\/www.alfresco.com\/\" target=\"_blank\">alfresco<\/a>, <a href=\"http:\/\/www.opendocman.com\/\" target=\"_blank\">opendocman<\/a>,&#8230;..<\/p>\n<p>In the end\u00a0I decided to give <a href=\"http:\/\/www.openkm.com\/\" target=\"_blank\">OpenKM <\/a>a try.<\/p>\n<p>OpenKM runs on a <a href=\"http:\/\/www.jboss.org\/\" target=\"_blank\">JBoss<\/a> application server, so you are bound to Java.\u00a0 They use <a href=\"http:\/\/jackrabbit.apache.org\/\" target=\"_blank\">Jackrabbit <\/a>for their hierarchical content storage.\u00a0 The frontend is realized with GWT (<a href=\"http:\/\/code.google.com\/intl\/de-DE\/webtoolkit\/\" target=\"_blank\">Google Web Tollkit<\/a>).<\/p>\n<p>For a full feature list click <a href=\"http:\/\/www.openkm.com\/Features.html\" target=\"_blank\">here<\/a>.<\/p>\n<h1><strong>OpenKM install hints:<\/strong><\/h1>\n<p>I installed OpenKM on a recent Debian 6.0<\/p>\n<h2>Getting .pdf, .docx, .xlsx preview running:<\/h2>\n<p>First you need to install OpenOffice. Make sure you install &#8230;-math, &#8230;-writer, &#8230; -draw, &#8230;-calc packages.<\/p>\n<p>OpenOffice hast to bee run in headless mode. I use following startup script:<\/p>\n<pre class=\"brush: bash\">#!\/bin\/sh\r\n### BEGIN INIT INFO\r\n# Provides:\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0OpenOffice Headless\r\n# Required-Start:\u00a0\u00a0 \u00a0\r\n# Required-Stop:\u00a0\u00a0 \u00a0\r\n# Default-Start:\u00a0\u00a0 \u00a02 3 5\r\n# Default-Stop:\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\r\n# Short-Description:\u00a0\u00a0 \u00a0OpenOffice Headless\r\n### END INIT INFO\r\n\r\nPIDFILE=\/var\/run\/openoffice-server.pid\r\n\r\ncase \"$1\" in\r\n'start')\r\n if [ -f $PIDFILE ]; then\r\n echo \"OpenOffice headless server has already started.\"\r\n sleep 5\r\n exit\r\n fi\r\n echo \"Starting OpenOffice headless server\"\r\n soffice \"-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\" -nologo -headless -nofirststartwizard &amp; &gt; \/dev\/null 2&gt;&amp;1\r\n touch $PIDFILE\r\n ;;\r\n'stop')\r\n if [ -f $PIDFILE ]; then\r\n echo \"Stopping OpenOffice headless server.\"\r\n killall -9 soffice &amp;&amp; killall -9 soffice.bin\r\n rm -f $PIDFILE\r\n exit\r\n fi\r\n echo \"Openoffice headless server is not running.\"\r\n exit\r\n ;;\r\n*)\r\n echo \"Usage: $0 { start | stop }\"\r\n ;;\r\nesac\r\nexit 0\r\n<\/pre>\n<p>To get the preview stuff working you need also <strong>pdf2swf<\/strong>. Check your \/bin directory there should be a pdf2swf executable or if you prefer you could take the <a href=\"http:\/\/packages.ubuntu.com\/de\/karmic\/swftools\" target=\"_blank\">swftool <\/a>package from <a href=\"http:\/\/www.ubuntu.com\/\" target=\"_blank\">ubuntu<\/a>.<\/p>\n<p>The last step to get the previewer feature running is to set the corresponding config. flags at the OpenKm.cfg file.<\/p>\n<ul>\n<li>system.openoffice=on<\/li>\n<\/ul>\n<ul>\n<li>system.pdf2swf=\/usr\/bin\/pdf2swf<\/li>\n<\/ul>\n<h2>Mail Notification configuration:<\/h2>\n<p>Mail notification is straight forward. Go to <strong>\/opt\/OpenKM-4.1_JBoss-4.2.3.GA\/server\/default\/deploy\/mail-service.xml . <\/strong>Edit the <strong> <\/strong>section to your<strong> <\/strong>needs.<\/p>\n<p>If you face the problem that the links in your notification mails are pointing to localhost, you can alter the <strong>application.url <\/strong>flag in your OpenKM.cfg.<\/p>\n<ul>\n<li>application.url={yourURL}:{yourPort}\/OpenKM\/es.git.openkm.frontend.Main\/index.jsp<\/li>\n<\/ul>\n<h2>Changing from port 8080 -&gt; 80<\/h2>\n<p>GoTo <strong>\/opt\/OpenKM-4.1_JBoss-4.2.3.GA\/server\/default\/deploy\/jboss-web.deployer\/server.xml <\/strong>and edit<\/p>\n<p>Change the <strong><em>port<\/em> <\/strong>field to <strong><em>80<\/em><\/strong>.<\/p>\n<h2>Securing your JBoss<\/h2>\n<p>One last thing needs to be done :-). Security! Holy Moly&#8230; what&#8230; yep.. Jboss runs out of the box like an open barn door. So a good idea would be to secure the <strong>jmx-console<\/strong> and <strong>web-console <\/strong>stuff. Because of that the <strong>jmx-console<\/strong> and <strong>web-console <\/strong>are standard servlets you can protect them very easily via enabling the security-constraint.<\/p>\n<h3>Securing the jmx-console:<\/h3>\n<p style=\"padding-left: 30px;\"><strong>1.<\/strong> Edit \\server\\default\\deploy\\jmx-console.war\\WEB-INF\\web.xml and uncomment the security-constraint section:<\/p>\n<pre class=\"brush: xml\"><!-- A security constraint that restricts access to the HTML JMX console\r\n to users with the role JBossAdmin. Edit the roles to what you want and\r\n uncomment the WEB-INF\/jboss-web.xml\/security-domain element to enable\r\n secured access to the HTML JMX console.--><!-- A security constraint that restricts access to the HTML JMX console\r\n to users with the role JBossAdmin. Edit the roles to what you want and\r\n uncomment the WEB-INF\/jboss-web.xml\/security-domain element to enable\r\n secured access to the HTML JMX console.-->&lt;!-- A security constraint that restricts access to the HTML JMX console\r\n to users with the role JBossAdmin. Edit the roles to what you want and\r\n uncomment the WEB-INF\/jboss-web.xml\/security-domain element to enable\r\n secured access to the HTML JMX console.--&gt;\r\n &lt;security-constraint&gt;\r\n &lt;web-resource-collection&gt;\r\n &lt;web-resource-name&gt;HtmlAdaptor&lt;\/web-resource-name&gt;\r\n &lt;description&gt;An example security config that only allows users with the\r\n role JBossAdmin to access the HTML JMX console web application\r\n &lt;\/description&gt;\r\n &lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\r\n &lt;http-method&gt;GET&lt;\/http-method&gt;\r\n &lt;http-method&gt;POST&lt;\/http-method&gt;\r\n &lt;\/web-resource-collection&gt;\r\n &lt;auth-constraint&gt;\r\n &lt;role-name&gt;JBossAdmin&lt;\/role-name&gt;\r\n &lt;\/auth-constraint&gt;\r\n &lt;\/security-constraint&gt;\r\n\r\n &lt;login-config&gt;\r\n &lt;auth-method&gt;BASIC&lt;\/auth-method&gt;\r\n &lt;realm-name&gt;JBoss JMX Console&lt;\/realm-name&gt;\r\n &lt;\/login-config&gt;\r\n\r\n &lt;security-role&gt;\r\n &lt;role-name&gt;JBossAdmin&lt;\/role-name&gt;\r\n &lt;\/security-role&gt;\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<p style=\"padding-left: 30px;\"><strong>2.<\/strong> Edit \\server\\default\\deploy\\jmx-console.war\\WEB-INF\\jboss-web.xml. Uncomment the following section:<\/p>\n<pre class=\"brush: xml\"> <!-- Uncomment the security-domain to enable security. You will\r\n need to edit the htmladaptor login configuration to setup the\r\n login modules used to authentication users.-->&lt;jboss-web&gt;\r\n &lt;!-- Uncomment the security-domain to enable security. You will\r\n need to edit the htmladaptor login configuration to setup the\r\n login modules used to authentication users.--&gt;\r\n &lt;security-domain&gt;java:\/jaas\/jmx-console&lt;\/security-domain&gt;\r\n\r\n&lt;\/jboss-web&gt;<\/pre>\n<p style=\"padding-left: 30px;\"><strong>3<\/strong>. Edit \\server\\default\\conf\\props\\jmx-console-roles.properties file<\/p>\n<p style=\"padding-left: 30px;\"><strong>4<\/strong>. Edit \\server\\default\\conf\\props\\jmx-console-users.properties file<\/p>\n<p style=\"padding-left: 30px;\"><strong>5<\/strong>. Edit \\server\\default\\conf\\login-config.xml edit following section<\/p>\n<pre style=\"padding-left: 30px;\"> props\/web-console-users.properties\r\n props\/web-console-roles.properties\r\n<\/pre>\n<p style=\"padding-left: 30px;\"><strong>6<\/strong>. under \\server\\default\\conf\\props\\ copy and rename the two jmx-console-xx to web-console-xx.<\/p>\n<h2>Automatically start OpenKM (Jboss) via init scripts:<\/h2>\n<p>If you want to start your OpenKM automatically at boot time you can use this init script:<\/p>\n<pre class=\"brush: bash\">#!\/bin\/sh\r\n# \/etc\/init.d\/jbossokm: Start and stop JBoss Application Service\r\n### BEGIN INIT INFO\r\n# Provides:\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0OpenKM\r\n# Required-Start:\u00a0\u00a0 \u00a0\r\n# Required-Stop:\u00a0\u00a0 \u00a0\r\n# Default-Start:\u00a0\u00a0 \u00a02 3 5\r\n# Default-Stop:\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\r\n# Short-Description:\u00a0\u00a0 \u00a0OpenKM\r\n### END INIT INFO\r\n\r\nECHO=\/bin\/echo\r\nTEST=\/usr\/bin\/test\r\nJBOSS_START_SCRIPT=\/opt\/OpenKM-4.1_JBoss-4.2.3.GA\/bin\/run.sh\r\nJBOSS_STOP_SCRIPT=\/opt\/OpenKM-4.1_JBoss-4.2.3.GA\/bin\/shutdown.sh\r\n\r\n$TEST -x $JBOSS_START_SCRIPT || exit 0\r\n$TEST -x $JBOSS_STOP_SCRIPT || exit 0\r\n\r\nstart() (\r\n $ECHO \"Starting JBoss OKM.\"\r\n rm -rf \/path\/to\/server\/default\/tmp\r\n rm -rf \/path\/to\/server\/default\/work\r\n rm -rf \/path\/to\/server\/default\/log\r\n su -l -c \"$JBOSS_START_SCRIPT -b 0.0.0.0 &gt; \/dev\/null 2&gt; \/dev\/null &amp;\"\r\n $ECHO \"Done.\"\r\n )\r\n\r\nstop () (\r\n $ECHO \"Stopping JBoss OKM. \"\r\n su -l -c \"$JBOSS_STOP_SCRIPT -S &gt; \/dev\/null &amp;\"\r\n sleep 10\r\n $ECHO \"Done.\"\r\n)\r\n\r\ncase \"$1\" in\r\n start )\r\n start\r\n ;;\r\n stop )\r\n stop\r\n ;;\r\n restart )\r\n stop\r\n sleep 30\r\n start\r\n ;;\r\n * )\r\n $ECHO \"Usage: jbossokm {start|stop|restart}\"\r\n exit 1\r\n esac\r\n exit 0\r\n<\/pre>\n<h2>Shutdown problems (network unreachable exception)<\/h2>\n<p>If you get an exception at shutdown or your shutdown script does not kill your JBoss then you could check sysctl-setting under<strong> \/etc\/sysctl.d\/bindv6only.conf.<\/strong><\/p>\n<p>Make sure that the <strong>net.ipv6.bindv6only=0. !<\/strong><\/p>\n<p><span style=\"color: #ff0000;\">If you would like to show your appreciation consider to support the guys from <\/span><a href=\"http:\/\/www.openkm.com\/\"><span style=\"color: #ff0000;\">OpenKM <\/span><\/a><span style=\"color: #ff0000;\">with a donation \ud83d\ude42<\/span><\/p>\n<p>See PayPal subscription link at the bottom of the <a href=\"http:\/\/wiki.openkm.com\/index.php\/Main_Page\">page<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><br \/>\n <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For\u00a0months I was searching for a system capable to track and store out internal documents. I tested several systems like alfresco, opendocman,&#8230;.. In the end\u00a0I decided to give OpenKM a try. OpenKM runs on a JBoss application server, so you are bound to Java.\u00a0 They use Jackrabbit for their hierarchical content storage.\u00a0 The frontend is &hellip; <a href=\"https:\/\/blog.fh-kaernten.at\/wehr\/2010\/07\/08\/openkm-our-new-document-management-system-nice\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">OpenKM our new Document Management System, nice&#8230;..<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-cool-tools","category-linux-stuff"],"_links":{"self":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":0,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}