This blog explains the steps to install Knowledge Tree on a Cent OS server.
We were asked to install a Knowledge Management System called Knowledge Tree for one of our shared hosting clients, whose website is hosted in Centos 5.5 server.
Once we got this requirement I went through knowledgetree web site and I found that they do not provide the documentation for the installation in Centos server but they support RedHat Linux 5 and it is clearly explained in their Platform Requirements page. So I decided to try it out on my own and once got it installed successfully, am sharing the steps with you.
I downloaded the community edition from their Knowledge Tree Community downloads page using the install from source code option.
Here is the installation steps I did
1. After downloading, untar the compressed file and open the folder through browser (i.e., http://yoursite.com/knowledgetree/) which goes through a series of steps for installation. These steps are very straight forward like checking installation requirements, database username and password etc..,
2. Once I completed the installation without any errors, I got the following error when I opened the installed knowledgetree site using a web browser
Fatal error: Cannot use object of type DB_Error as array in /var/www/knowledgeTree/lib/session/Session.inc on line 252
This error is because that there is no contents in the database which should have been created by the Knowledge Tree installation process during installation. I don’t know why this was not done automatically when we installed even though we provide database username and password.
In any case, I went to the knowledgetree/sql/mysql/install/ folder and found the data.sql and structure.sql files. I downloaded both the files and imported structure.sql and then data.sql
3. Now, when I checked the site http://yoursite.com/knowledgetree/
I got a new error
Fatal error: Call to a member function getPath() on a non-object in /var/www/knowledgeTree/lib/plugins/pluginutil.inc.php on line 597
This error can be fixed by truncating the two tables in database. I truncated them using phpmyadmin and opened the database and ran the following two SQL statements.
4. Now, I got the following error when I accessed the site http://yoursite.com/knowledgetree/
[db_error: message=”DB Error: connect failed” code=-24 mode=return level=notice prefix=”” info=”Array”]
I fixed it by verifying the database credentials in /var/www/knowledgeTree/config/config.ini
dbHost = localhost
dbName = database name
dbUser = database username
dbPass = database password
dbPort = 3306
dbAdminUser = database username
dbAdminPass = database password
Please remember to change “dbAdminUser” and “dbAdminPass” which I forgot earlier.
Thus completed by installation after my tough fight with it, but at the end it worth it as it took care of the client’s need.
Hope someone will find this information useful if you are looking to install Knowledge Tree on Cent OS.