KnowledgeTree 3.5.* - Performing a Source Only Install
From KnowledgeTree Document Management Made Simple
Source Only - Platform Requirements
The requirements for the Source Only package differ from the stack installed systems. If you are installing KnowledgeTree Source Only Package, you will need the following:
Required Server Software
- PHP 5.2 or above
- PHP LDAP extension (if LDAP or ActiveDirectory integration is required)
- PHP Exif extension (if header extraction from JPEG and TIFF files is required)
- PHP mbstring extension (functions for multi-byte character sets)
- PHP mysql extension (interface to mysql database from php)
- PHP json extension (functions for working with json structures)
- PHP fileinfo extension (functions for resolving mime types of documents)
- MySQL Server, Client, and PHP libraries, version 5.0.41 or above
- Apache 2.0 or above
- pdftotext (required for indexing of pdf files on Microsoft Windows and Linux/UNIX,)
- pstotext (required for indexing of postscript files on Microsoft Windows)
- Open Office 2.0 or above (required for indexing of office document types)
- Info-Zip (required for extracting contents of zip files)
Supported Server Operating Systems
- Microsoft Windows 2000/2003 Server
- Linux,
- FreeBSD
- Sun Solaris
Note: KnowledgeTree should run on any platform capable of hosting the Apache/MySQL/PHP stack described above.
Required Client Software
A modern web-browser, such as:
- Firefox 1.0+
- Internet Explorer 6.0+
Note: A Source Only requirements page is hosted and updated on the KnowledgeTree website.
Performing a Source Only Install - KnowledgeTree 3.5*
This procedure manually installs KnowledgeTree Open Source on generic Windows systems, and on Unix-like operating systems.
Warning! Manual installations of KnowledgeTree Open Source are not supported. We recommend that you use the KnowledgeTree Open Source Stack Installer. The Open Source stack installer installs PHP, MySQL, and Apache, and includes the external applications required for running KnowledgeTree Open Source.
Prerequisites:
Ensure that you have the correct version of PHP, MySQL and Apache installed and configured for the latest version of KnowledgeTree.
Perform the following steps:
1.Download the KnowledgeTree Source Only package from the KnowledgeTree website
Note: The source package is independent of the operating system.
2. Create the environment for installing KnowledgeTree Open Source:
2.1 Move the KnowledgeTree folder to the directory where it is going to be served from:
$ mv knowledgeTree /path/to/your/html/directory/
2.2. Configure your Web server to access KnowledgeTree Document Management System.
2.3. Run the pre-checkup script: If your KnowledgeTree installation is at
http://localhost/, go to http://localhost/setup/
Note: Review your configuration if the pre-checkup script fails.
2.4. Set up the database - see the steps below and follow the instructions for your environment:
Unix Step 1: Create a database $ mysqladmin -p create dms
Step 2: Create and populate the tables $ mysql -p dms < sql/mysql/install/structure.sql $ mysql -p dms < sql/mysql/install/data.sql
Step 3: Create the database users $ mysql -p dms < sql/mysql/install/user.sql Windows Note: Locate the MySQL applications on your system; then, use the path to these applications in the commands below. Step 1: Create a database X:\> mysqladmin -u root -p create dms
Step 2: Create and populate the tables X:\> mysql -u root -p dms < sql/mysql/install/structure.sql X:\> mysql -u root -p dms < sql/mysql/install/data.sql
Step 3: Create the database users $ mysql -u root -p dms < sql/mysql/install/user.sql
2.5. Configure your installation in the KnowledgeTree config.ini file:
Note:
- The default configuration automatically determines many settings on your installation; since this is the preferred method of running KnowledgeTree, please don't adjust these settings unnecessarily.
- After completing your initial evaluation, we recommend that you modify your configuration, including default database connection settings, to comply with security best practices for your platform.
- The default configuration uses default settings for the database location, username and password. These are defined in the user.sql file mentioned above. Provided that you have followed the examples above for setting up the database, KnowledgeTree should be fully configured to work.
The following settings in config/environment.php control the database connectivity. Default settings are: [db] dbHost = localhost dbName = dms dbUser = dms dbPass = dmspassword dbPort = default dbAdminUser = dmsadmin dbAdminPass = admin
3. Verify file access permissions on the KnowledgeTree folders.
- Your Web server MUST be able to write to the ‘var’ folder in the root of the KnowledgeTree installation.
- The installation setup script (see above) will display the user (Unix user account) that must be able to write to these folders.
Note: The installation setup script will not show the account name for Windows users because there is no commonly available way to do this. The user needs to know what the account name is.
- Your Web server should preferably not be able to write to the remaining folders – e.g. if your Web server is running as user ‘nobody’ and group ‘nogroup’, then change to the KnowledgeTree directory and type:
Unix: ’chown -R nobody.nogroup var' Windows: Check the folder’s Permissions and Security tabs (Right click on the folder; then, select Properties.)
4. Review the post-installation check list. If your KnowledgeTree installation is at http://localhost/; then, go to http://localhost/setup/ and click Post-installation checkup.
Note: The checkup will alert you if there are errors and provide information about the error – e.g. that it cannot read/write to a certain location, or that it cannot connect to the database. Review the steps above to fix the error.
5. Log in to KnowledgeTree's Web interface:
5.1. Use your Web browser to navigate to your KnowledgeTree installation.
5.2. Enter your username and password on the Login screen; then, click OK.
Note: A default Admin user – username admin and password admin – is set up during installation. The default admin user login allows initial access to KnowledgeTree. This initial login has no relation to the two MySQL accounts created at installation.
6. Install the following external applications to enable file indexing.
Note: KnowledgeTree's file indexing and other features require the use of external programs. We recommend that you use the package and configuration management facilities of your operating environment to install these applications – for example, using the rpm or apt-get tools on Linux systems. Indexing is automatically installed when you install KnowledgeTree Open Source using the Open Source Stack Installer. You can download the Open Source Stack Installer at the KnowledgeTree website.
- pdftotext – from http://www.foolabs.com/xpdf/ (for indexing PDF documents)
- Unzip – from http://www.info-zip.org/ (for bulk upload)
- zip – from http://www.info-zip.org/ (for bulk download)
- Open Office – from http://www.openoffice.org (for pdf generation and importing of various office document types)
- Java – from http://www.sun.com (to run the Document Indexer)
7. Edit the following sections in the config.ini file:
- externalBinary - allow external applications to be found
- openoffice - allow KnowledgeTree to communicate with the OpenOffice server
8. Start OpenOffice as a server:
8.1 Are you installing on Unix?
- Yes. If you are using OpenOffice 2.0 - 2.2 and do not have X Windows, the Xvfb virtual display daemon is required to start OpenOffice.
$ Xvfb -screen 0 800x600x16 &
Note: Please consult the documentation on Xvfb for more details on usage for your operating system.
- No. Go to step 9.
8.2 Start OpenOffice as a background task:
Unix: OpenOffice 2.0 - 2.2: $ nohup soffice -invisible -accept='socket,host=localhost,port=8100;urp' -display :0 & OpenOffice 2.3+: $ nohup soffice.bin -headless -accept='socket,host=localhost,port=8100;urp' &
Windows: X:\> soffice -headless -invisible -accept='socket,host=localhost,port=8100;urp'
Change the port as required and ensure that it corresponds with the config.ini setting.
Note: For more information on starting OpenOffice as a background task, go to http://www.openoffice.org.
9. Schedule the background tasks:
Note: KnowledgeTree requires a few background tasks to be performed, such as indexing.
Run /opt/ktdms/knowledgeTree/bin/scheduler.php as a background process:
Unix: Edit the cron. To do this, add the following: */5 * * * * /path_to_php/php /opt/ktdms/knowledgeTree/bin/scheduler.php > /dev/null
Windows: Configure the Windows Scheduler to run the script in the background once a minute.
10. Start the Document Indexer:
Unix: $ cd /opt/ktdms/knowledgeTree/bin/luceneserver $ nohup java -jar ktlucene.jar&
Windows Start a command prompt: java -jar ktlucene.jar
Note: This process will fail if the command prompt does not remain active.
Alternatively, to run the Document Indexer as a background service, use the JavaService wrapper from http://forge.objectweb.org/projects/javaservice/
del.icio.us
reddit

