RedHat Enterprise Linux 4.0

From KnowledgeTree Community

Jump to: navigation, search

These are sort of quick and dirty instructions. There are improvements that could be made to improve both performance and security. The places where security could be improved have been marked.

Install Apache

[root@foo /]# up2date httpd


Install MySQL

[root@foo /]# up2date mysql-server


Install PHP

[root@foo /]# up2date php

[root@foo /]# up2date php-mysql

[root@foo /]# up2date php-ldap

       [root@foo /]# up2date php-mbstring


Install Xpdf (needed for pdftotext)

[root@foo /]# up2date xpdf


Install Ghostscript (needed for pdftotext)

[root@foo /]# up2date ghostscript


Install pstotext

[root@foo /]# rpm -ivh ftp://rpmfind.net/linux/PLD/dists/ra/PLD/i686/PLD/RPMS/pstotext-1.8g-1.i686.rpm


Install catdoc, catppt and xls2csv

These can be installed from source, however an easier method is to get them from the RPM Forge repository.

Add the following lines to /etc/sysconfig/rhn/sources:

# RPMForge Repository

yum rpmforge http://apt.sw.be/redhat/el4/en/i386/dag


Now execute the following (the first command gets the GPG keys; the second actually installs the package...NOTE - This can take several minutes to complete):


[root@foo /]# rpm -Uvh http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/fc4/i386/RPMS.dries/rpmforge-release-0.2-2.2.fc4.rf.i386.rpm

[root@foo /]# up2date catdoc


Download the KnowledgeTree tarball from http://prdownloads.sourceforge.net/kt-dms/

An example filename is knowledgeTree-3.1b.tgz.


Unpack KnowledgeTree into your web root and set permissions

BE ADVISED! This is a fairly liberal set of permissions; it is giving the webserver daemon write access to the knowledgeTree folder and everything in it. This is done to ease installation.

[root@foo /]# tar -xvzf knowledgeTree-3.1b.tgz /var/www/html

[root@foo /]# mkdir /var/www/html/knowledgeTree/var

[root@foo /]# mkdir /var/www/html/knowledgeTree/Documents

[root@foo /]# chown -R apache:apache /var/www/html/knowledgeTree


Configure MySQL

(If this is not a new MySQL installation, you probably want to skip the next two steps, since we're changing the root password. In the steps following it, simply use the existing root password.)

[root@foo /]# service mysqld start

[root@foo /]# mysqladmin -uroot password <put a new secure password here!>

[root@foo /]# mysql -uroot -p

mysql> create database dms;

mysql> exit

[root@foo /]# mysql -uroot -p dms < /var/www/html/knowledgeTree/sql/mysql/install/structure.sql

[root@foo /]# mysql -uroot -p dms < /var/www/html/knowledgeTree/sql/mysql/install/data.sql

The default permissions given to the users in user.sql are far too liberal. Edit the file, replacing the '*' with 'dms.*'

[root@foo /]# vi /var/www/html/knowledgeTree/sql/mysql/install/user.sql

[root@foo /]# mysql -uroot -p dms < /var/www/html/knowledgeTree/sql/mysql/install/user.sql


Configure Apache

Create a directory configuration for knowledgeTree in Apache (This gives .htaccess files in the knowledgeTree folder the ability to run any apache runtime configuration directive!)

[root@foo /]# vi /etc/httpd/httpd.conf

Add/uncomment the following lines and save/quit:


           NameVirtualHost *:80
           <VirtualHost *:80>
                ServerName ktdms
                DocumentRoot /var/www/html/knowledgeTree
                ErrorLog logs/knowledgeTree-error_log
                CustomLog logs/knowledgeTree-access_log common
               <Directory "/var/www/html/knowledgeTree">
                   AllowOverride All
               </Directory>
           </VirtualHost>


Edit the KnowledgeTree config file:

Update the [email] section, setting the emailServer variable equal to your organization's SMTP server

Update the paths in the [indexer] section

xls2csv = /usr/bin/xls2csv

pdftotext = /usr/bin/pdftotext

catppt = /usr/bin/catppt

pstotext = /usr/bin/pstotext

catdoc = /usr/bin/catdoc


Start the servers (if they're not already):

[root@foo /]# service mysqld start

[root@foo /]# service httpd start


Browse to the checkup page and make sure everything is green http://localhost/knowledgeTree/setup


Log in to knowledgeTree and change the admin password

http://localhost/knowledgeTree

User: admin

Pass: admin

Personal tools