Novell Home

Installing the Open Source "KnowledgeTree Document Management System" On NetWare

Novell Cool Solutions: Feature
By Matt Mencel

Digg This - Slashdot This

Posted: 19 Nov 2004
 

Matt Mencel
email: Mr<DASH>mencel<AT>wiu<DOT>edu
Western Illinois University
Computer Support Services

From the Web site... http://kt-dms.sourceforge.net/

"KnowledgeTreeTM is an Open Source document management system. The product provides a content repository, workflow and routing of content, content publication and content metrics definition and analysis."
Introduction
Our Situation
KnowledgeTree Configuration
LDAP Authentication/Configuration
FileIndexer Configuration
Conclusion
References

Introduction

Thanks go out to the members of the Novell JVM forum for helping me get FileIndexer running.

Intended Audience:

  • System administrators, helpdesk managers, and users who want a better way to organize their documentation.

Readers should be familiar with:

  • Apache/MySQL/PHP
  • phpMyAdmin or some other method for managing MySQL
  • LDAP/eDirectory

Our Situation

Recently I was tasked with finding a better way to store and retrieve support documentation for our helpdesk. After searching online for a "Document Management Solution" I came across KnowledgeTree. It is open source, has a lot of cool features (LDAP authentication, file indexing, checkin-checkout, versioning, etc...), and runs on Apache/PHP/MySQL. I decided to see if we could try to put it on one of our NetWare servers.

KnowledgeTree comes in three parts:

  • KnowledgeTree Web Application is all the PHP and configuration files that make up the actual application.
  • FileIndexer is a Java application that scans KnowledgeTree for any new or newly modified documents (doc, xls, txt, html, PDF, etc...) and indexes their contents so you can search on them in KT.
  • DocumentArchiver scans for documents that are marked to be archived...and archives them.

After a little trial and error, and with some help from the Novell JVM support forum (thanks guys!), I was able to get KnowledgeTree and the FileIndexer applications to run nicely on a NetWare server. This includes authentication into eDirectory and running the FileIndexer Java app each morning using CRON. We haven't decided if we're going to use DocumentArchiver yet so there is nothing about that here (setup should be similar to FileIndexer I would think).

You can read the System Requirements on their Web page. It ran just fine here on NetWare 6.5 with SP2 and eDirectory 8.7.3.2, and I imagine it would run just as well on a NetWare 6.0 server.

KnowledgeTree Configuration

Download the KnowledgeTree Web Application from the kt-dms Web page. Follow the installation instructions included with the application. I will note here some of the items I configured and what, if any, changes or gotchas I ran up against.

  1. PHP Configuration - I didn't change anything in my PHP.INI file.


  2. Move KnowledgeTree - Place it wherever you want Apache serving it from.


  3. Create Database - I used phpMyAdmin on the NW65 server to create a database called "dms" and a user called "dms" who had full privileges to the dms database.
  1. Import Tables - I used phpMyAdmin again. Open the DMS database you just created, click the SQL tab, then browse to and import the tables.sql and users.sql files located in the KnowledgeTree/sql/mysql/install folder.
  1. Change these entries in config/environment.php
    1. fileSystemRoot = "VOLNAME:path/to/knowledgeTree"
    2. serverName = "your.server.name" (or IP or "localhost")
    3. rootUrl = "/knowledgeTree"
    4. sslEnabled
    5. Set the database properties for the knowledgeTree database you just created in MySQL
    6. Check permissions...N/A for NetWare

  2. Edit the email section if you want knowledgeTree to be able to email users from within the application.

LDAP Authentication/Configuration

KT is configured to use iPlanet (SunONE) or ActiveDirectory by default. It took me a little digging around to find out what we needed to change to get it working with eDirectory, but once these changes were made it worked great.

  1. Login with the KT admin account, using the DBAuthentication method set in config/environment.php (we'll change this to LDAP in the next step).
  1. Edit the following lines in config/environment.php
    1. $default->authenticationClass = "LDAPAuthenticator";
    2. $default->ldapServer = "EDIRECTORY_SERVERNAME_OR_IP";
    3. $default->ldapRootDn = "EDIRECTORY_BASEDN";
      1. This is not required if you just want to search from the root of the tree. Otherwise enter the BaseDN you want to search from (e.g. OU=MyOU,O=MyORG).
    4. $default->ldapServerType = "iPlanet";
      1. Leave as iPlanet.

  2. In the KT application, browse to the ADMIN section.
    1. Click on "System Settings" in the lower left.
    2. Set the LDAP settings as you did in environment.php.
      1. The only entries I have set are LDAP Server and Server Type (iPlanet by default).
  1. Edit the following line in lib/authentication/class.AuthLdap.php
    1. In the function "getUserIdentifier", change <return "uid"> to <return "cn">.
      1. If you use uid, the subtree search doesn't work and it will only find users in whatever your current BaseDN is.
  1. Edit the following line in presentation/lookAndFeel/knowledgeTree/administration/usermanagement/addUserBL.php. Without this change, the admin interface will not return the correct LDAP data to the screen.
    1. Find the else section below this line.
      •     if ($default->ldapServerType == "ActiveDirectory") {
    2. In the else section edit the "$aAttributes = array..." attributes list.
      1. Change "uid" to "cn".
  1. I also changed "mobile" to "telephonenumber" as we don't store mobile numbers in eDirectory.


  2. Edit the following line in presentation/lookAndFeel/knowledgeTree/administration/usermanagement/addUserUI.inc. This controls how the LDAP data is returned to the screen in KT.
    1. Find the function "getDetailsLDAPPage"
      1. Find and change <$aUserAttributes["userPrincipalName"]> to <$aUserAttributes["mail"]>.
      2. Optional...find and change the line with "Mobile Number"
        1. I changed the text "Mobile Number" to "Phone Number" and changed the $aUserAttributes["mobile"] to $aUserAttributes["telephonenumber"]


Click to view larger image.

  1. Add your account from eDirectory/LDAP and give it "System Administrator" privileges to KT. The default Admin login will no longer work unless you change back to DBAuthentication in the environment.php file.
    1. Go to the User Management section in the Admin panel.
    2. Select "Add A User" at the top of that panel.



    3. You should be able to enter your username from eDirectory. KT will query eDirectory and return your user information to the next screen.
    4. Select your notification preferences, add your user to the "System Administrator" group, and click ADD. This will place your username into the KT database so KT can manage subscriptions, document information, KT privileges, etc... but you will still authenticate into eDirectory when you login.

FileIndexer Configuration

FileIndexer was the hardest thing to get working...at least for me. Apparently NetWare doesn't do CWD so I spent hours trying to hardcode paths and classpaths and environment variables, edit/move/rename jar and class files. I even figured out how to install Apache-Ant on NetWare and build the FileIndexer app from source thinking maybe that would fix the problems I was having. When some gentlemen from the JVM forum finally got me straightened out it turned out to be quite an easy solution.

  1. Download and unpack FileIndexer to a directory on the server that is hosting KnowledgeTree. (I'll use SYS:FileIndexer here in my example, but you could put it anywhere).
  2. Edit the KTDataStore.xml and KTDataSource.xml files.
    1. This documentRoot value worked for me in the KTDataSource.xml file.
      <VOLNAME:/path/to/knowledgetreeroot/Documents>
  3. Create and edit a FileIndexer.NCF file in the same folder you unpacked FileIndexer to.
setenv FI_HOME=sys:\fileindexer
envset FI_HOME=sys:\fileindexer
setenv FI_CLASSPATH=sys:\fileindexer\fileindexer-1.1.3.jar
envset FI_CLASSPATH=sys:\fileindexer\fileindexer-1.1.3.jar
java -mx256m -envCWD=$FI_HOME -cp $FI_CLASSPATH -jar FileIndexer-1.1.3.jar
  1. Edit SYS:ETC/CRONTAB.NLM and add an entry so it runs the FILEINDEXER.NCF at set intervals. (e.g. <45 7 * * * SYS:FILEINDEXER/FILEINDEXER.NCF> runs it every morning at 7:45)
  2. Add CRON to your AUTOEXEC.NCF
  3. LOAD CRON at the command prompt.

Conclusion

If you're looking for a better way to manage your documents, than maybe something like KnowledgeTree is the way to go. In my opinion it has to be one of the better open source DMS systems available. They welcome involvement from the end users so if there's some "must have" feature you think is missing, you have the option to develop and submit the improvement yourself or "hire" the KT developers to do it for you. That's one of my favorite things about open source software, being able to develop your own improvements and add-ons to an existing product.

References

KnowledgeTree Web site: http://kt-dms.sourceforge.net/

Novell JVM forum: http://developer.novell.com/ndk/devforums.htm


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell