Installing KnowledgeTree 3.5 dependencies on Gentoo

From KnowledgeTree Community

Jump to: navigation, search

Instructions provided by INET PROCESS

Contents

Install the Linux packages

If you install KnowledgeTree from scratch, you need the following packages :

  • catdoc (also contains xls2csv and catppt)
  • pstotext
  • sun-jre-bin & sun-jdk
  • xpdf or only poppler
  • ghostscript


You may have to install some by hand.


For a gentoo system, you can install the whole packages with :

# emerge -av knowledgetree

But, it needs php4 and install knowledgeTree in /var/www/


If you want to do everything by hand :

# emerge -av catdoc pstotext sun-jdk sun-jre-bin poppler ghostscript


Make PDF Generator and Lucene working

  • 1/ On gentoo, to install the xorg-server, put in /etc/portage/package.use (if you removed the global USE "xorg" in your make.conf) :
x11-base/xorg-server xorg


Then :

# emerge -av openoffice-bin xorg-server


  • 2/ Change the path of python in config.ini to :
/usr/lib/openoffice/program/python


this file is located in /usr/lib32/openoffice/program/python on 64bits systems


  • 3/ Add the port 8100 in firewall


  • 4/ Configure Lucene with the right path :
# nano /myktpath/bin/luceneserver/KnowledgeTreeIndexer.properties

and change the path with the right var/indexes folder (create it if needed)


  • 5/ To test and start the knowlegeTree Services, we configure Xorg (optional) :
# xorgconfig


Then we start the server

# Xvfb :5 -screen 0 800x600x16 &
# soffice -nofirststartwizard -nologo -headless -display :5 -accept='socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' &
# cd /myktpath/bin/luceneserver/
# java -jar ktlucene.jar &


  • 6/ I can create a script to launch the service automatically :
# nano /etc/init.d/kttools


<source lang="bash">
case "$1" in
start)
       echo -n "Starting KTTools\n"
       Xvfb :5 -screen 0 800x600x16 &
       soffice -nofirststartwizard -nologo -headless -display :5 -accept='socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' &
       cd /myktpath/bin/luceneserver/ && java -jar ktlucene.jar &
;;
stop)
       echo -n "Stopping KTTools\n"
       killall soffice
       killall Xvfb
       killall java
;;
*)
echo "Usage: kttools {start|stop}"
exit 1
esac
exit 0
</source>


I change the rights to execute the script, and I put it in system startup :

# chmod +x /etc/init.d/kttools
# rc-update add kttools default


Problem with 64bits architecture

If you have any problem with 64bits architecture, you have to compile the kernel with these options :

CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT =y


If I have a python error or the pdf is not generated, try that :

#  ln -s /usr/lib32/openoffice/program/libpython2.3.so.1.0 /usr/lib32/libpython2.3.so.1.0


If you have a PHP error, try to change php.ini with : expose_php = Off

External Links

Personal tools