Keeping a Knowledge Base

Work smarter by storing your vital brain tools in an open-source knowledge base.
When you run a small business, you need to do more with less. Efficiency is key.
For example, imagine that you have a contract providing help-desk support for an outsourced application such as a content management system. To provide optimal support with a low mean time to resolution (MTTR), your staff must have volumes of information — documentation, best practices, common wisdom, and field notes — at their very fingertips. In many organizations, knowledge base software provides such ready access.
Every major application server vendor offers a pricey knowledge base application that operates seamlessly with their basic server. But as “LAMP Post” has shown repeatedly before, there’s no reason to pay for expensive proprietary software if an equivalent open source solution exists.
Many people reading this magazine are likely familiar with Owl (http://XXX), a robust document repository that serves well in nearly all situations. This month, however, let’s explore an up-and-coming tool called the Knowledge Tree Document Management System (KT).
KT is written in PHP and made available under the GNU General Public License. Development on KT is ongoing. The latest version 2.02 (dated April 12, 2005) is available on SourceForge at http://kt-dms.sourceforge.net/

Getting Started with Knowledge Tree

KT is an impressive repository system with all of the bells and whistles. The latest version of KT provides web-based browsing/publishing, a version control system, subscription-based change notification, auto-archiving, document-level discussion forums, full-text search of common file formats and metadata, and internationalization of front-end web interface. What’s more impressive is its authentication integration with such LDAP servers as OpenLDAP, Sun ONE Directory Server, and the ubiquitous Active Directory. KT also provides access control via group, role or business unit rules, as well as audit trails for change control auditing.

Before getting started, be sure your server meets the system requirements. KT requires Apache 1.3 or greater, PHP 4.3 or greater, and MySQL 4.0 or greater with INNODB support. It is highly recommended that you install SSL capabilities into Apache. The sample installation was running Linux kernel 2.4.20-8, Apache 1.3.28, PHP 4.3.4, Mod_SSL 2.8.15-1.3.28 supported by OpenSSL 0.9.7e, and MySQL 4.0.14-standard.

Installing and Configuring KT

Download the latest version of KT and extract the tarball within the DocumentRoot of your Apache installation. Next, change directory to DocumentRoot and create and populate a MySQL database by executing:
% mysqladmin create dms
% mysql dms < sql/mysql/install/tables.sql
Then enter the MySQL shell and execute…
grant all on dms.* to dmsdbuser@localhost identified by ’h@ckm3’;
… so that you can specify unique user privileges for the application.
Before proceeding further, check if the prerequisites for KT are indeed satisfied using a handy script provided with KT. If your install is on localhost, enter http://localhost/knowledgeTree/setup/ into your browser. If KT is the only application running on your Apache instance, it is safe to go with the recommended values and compile in any suggested PHP extensions, such as Gettext and Fileinfo. Otherwise, check with your system administrator or other application documentation for potential conflicts and set the configuration appropriately.
Next, set up the appropriate file system permissions and directories for KT. Check to see which user Apache is running as — it’s typically the user and group nobody — and make a note of it. Then, in your KT base install directory, run…
# chown –R nobody:nobody Documents 
# chown –R nobody:nobody log
… which ensures that your web server can write to these directories. Now, setup your database access privileges by editing config/environment.php from your KT installation base directory, changing the username and password variable values that you set previously in the MySQL GRANT statement.
At this point, you’re ready to run the post-installation check script and continue customization online. If your install is on localhost, enter http://localhost/setup in your browser and click on the Post-installation checkup link on the bottom of that page. Look for any error messages and consult the Frequently Asked Questions at docs/FAQ.txt before posting to message boards and mailing lists. Fix any problems you may have encountered, and once everything is working, browse to your KT install at http://localhost/knowledgeTree/.

Knowledge Tree In Action

Login to your freshly constructed document repository by using the default username admin and password admin. Logging in as admin grants you complete web-based control over KT.
Your first step, as always, is to change your password and admin user metadata. Click on the Preferences link in the top menu and edit your name, email address, and password.
Beyond name and password, the first area to customize is document types. Document types can be really anything related to the type of knowledge you’re storing, like music files, network diagrams, or help desk escalation procedures. Click on the Admin menu, then Document Type Management. Go ahead and enter a few document types related to your application.
Other KT administrative tools manage user, group, and organizational access control and LDAP and mail server settings. It’s a good idea to edit your mail settings immediately after KT is up and running.
The Browse Collections section is where the action is. This is where your users and organizational administrators create folders and upload and maintain documents.
Create a new folder by clicking on the Add a Folder link on the left menu. Give it a name, and select one of the document types that you created in the administration menu earlier. After creating the folder, browse to it via the Browse Collections link in the top menu. Then, to upload a new document, click on the Add a Document link in the left menu, select one of the associated document types, and click Next. On the following screen, select the local file to upload, enter in all related metadata, then click Add.
After each document is uploaded, you must complete its information page. There are several options to choose from including checking the file in and out, subscribing, and posting a discussion. To elaborate on the former two:
*If you want to edit the file, first click on its Checkout link, which locks the file record from other users and downloads the file for you to manipulate. When you’re ready to commit your changes, browse back to the document info page in KT and click on Checkin to re-upload the modified document to KT.
*If you’d like to receive updates when changes occur to documents stored in KT, click on the Subscribe button on the info page of any stored document. When someone edits a file that you’ve subscribed to, you’ll be notified on the KT Dashboard. Subscriptions to files can be managed via the Subscriptions page.
Two of the coolest features of Knowledge Tree are its external FileIndexer and DocumentArchiver packages. The FileIndexer scours your uploaded KT documents and provides extensive search of your knowledge base. The DocumentArchiver is a package that, when run as part of your nightly cron batch jobs, automatically archives files that meet the aging criteria set within the KT web interface.
However, both FileIndexer and DocumentArchiver require Java. If you don’t yet hava Java (and many Linux distributions do not include it by default), you can download Java 2 Standard Edition for free from Sun’s web site located at http://java.sun.com/downloads/index.html. (Setting up J2SE is relatively easy, but beyond the scope of this article.)
After Java is installed properly, download the FileIndexer on the KT Sourceforge site. The distribution version, documentArchiver-dist-1.0.1.zip file should work fine unless you want to polish your Java skills with the complete source code version. Unzip the archive in an offline directory on your host (out of the DocumentRoot). Next, edit the files KTDataSource.xml and KTDataStore.xml and provide the same parameters as your core KT web installation, including database parameters and DocumentRoot. Finally, execute…
% java –Xmx256m –jar FileIndexer.jar
… to begin the indexing process. You can create a cron job based on this command to perform nightly indexing.

What’s Next?

Knowledge Tree Document Management System is an extremely robust knowledge base system that gives the omnipresent Owl a run for its money. With its LDAP integration option, it can easily plug-in to your enterprise’s existing architecture, and within five minutes of setup, can become an inexpensive, yet feature-rich solution.
Knowledge Tree has an active forum and mailing list, and you can contract directly with the maintainers to receive professional services.
Keep in mind that because the front-end is in PHP and the package itself is available per the GPL, you can customize the look and feel with relative ease for seamless integration with other web products. Think of the power you’ll have when you piece together best-of-breed open source technologies for the maintenance of your company’s environment: RT (discussed last month) for ticket-tracking, Nagios for monitoring, SNORT for intrusion detection and Knowledge Tree for document management…
Now if only someone would create an application programming interface for a consolidated, single sign-on authentication, your job would be a lot easier.

Michael Bordash is Linux Magazine’ s” LAMP Post” columnist. Michael provides Open Source IT consulting for Fortune 1000 companies and is also the founder of InternetDJ.com. You can reach Michael at class="emailaddress">mbordash@internetdj.com.

Comments are closed.