README.txt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Dokeos Search Plugin Installation Guide
  2. =======================================
  3. 1. Introduction
  4. ---------------
  5. This search plugin is composed of everything you need to get up and
  6. running with a full-text search feature on your Dokeos portal. However,
  7. this installation is not easy, and if you are not familiar with the
  8. term "indexing", or with the configuration of a Linux server, we
  9. highly recommend you seek advice from a qualified system administrator
  10. to help you doing this. Of course, the Dokeos company, for which I am
  11. directly working, offers this kind of services. Feel free to contact
  12. info@dokeos.com for a quote.
  13. This search plugin relies on a search server, called MnogoSearch, which
  14. has to be installed independently on a Linux server (the Windows
  15. version, sadly, is not GPL nor free to use).
  16. The following installation guides you through the steps of installing
  17. the server on a Debian or Ubuntu computer, but you might probably
  18. succeed in installing it on other architectures.
  19. Dokeos has made considerable efforts to have MnogoSearch integrated
  20. into the latest versions of PHP, but it would never have succeeded
  21. without the help of pierre.php@gmail.com who did all the technical
  22. work.
  23. 2. Installing files
  24. --------------------
  25. All the "conf" files and the "search.xml.php" file in this package
  26. need to be revised to configure properly. Most of all, you should look
  27. for a "DBAddr mysql://db_user:db_pass@db_host/db_name/?dbmode=single"
  28. line in the server files to make sure it is using the correct database
  29. credentials.
  30. Now you will see that there are two directories in this plugin.
  31. The "client" directory needs to stay there. The "client/www" directory
  32. contains a PHP script that needs to be copied at the root of your
  33. Dokeos portal (this will later give the indexing server an access to
  34. your Dokeos portal).
  35. The "server" directory has to be moved on the indexing server (which
  36. might be the same as your Dokeos portal's server if it is not too
  37. overloaded).
  38. This "server" directory contains three subdirectories.
  39. The "server/etc" directory contains the configuration of the
  40. mnogosearch server, which typically on Debian will be located in
  41. /etc/mnogosearch. Once you have installed the mnogosearch server,
  42. you can pretty much overwrite the configuration with the files
  43. contained in "server/etc", as they are already customised for indexing
  44. Dokeos.
  45. The "server/cron.d" directory contains an optional file that you might
  46. want to put in /etc/cron.d, so that the indexing will be run every night
  47. 5.00am.
  48. The "server/www" directory contains files that should be made available
  49. to the public, to access idexation results. Feel free to put these, for
  50. example, in /var/www/mnogosearch on your indexing server if that's where
  51. Apache takes its public files.
  52. 3. Installing the search server (MnoGoSearch)
  53. ---------------------------------------------
  54. The mnogosearch server installation comes in two parts:
  55. A) installing the mnogosearch indexing server itself. This can be done
  56. with a simple:
  57. sudo apt-get install mnogosearch-common mnogosearch-mysql
  58. B) installing the PHP5-mnogosearch bindings. This can be done by using
  59. the PECL command-line installer
  60. sudo pecl install mnogosearch-1.0.0
  61. Once the server is installed, you may need to install server specific
  62. additional programs to allow your indexer to go into documents (PDF,
  63. Word, Excel, etc) and index the contents of these documents as well.
  64. You can find a list of programs supposed to be there in the
  65. server/etc/indexer.conf file. Search for "pdftotext" and you will find
  66. the lines nearby all define a program used to translate a document
  67. into pure text before indexing it. Make sure you are able to launch
  68. all of these commands on the command line. If you can't, the indexing
  69. server is not likely to be able to do it either...
  70. 4. Creating the DB and Dokeos user
  71. ----------------------------------
  72. In order to keep the index data, mnogosearch requires a database to
  73. store this data. It is recommended to create an alternative user, with
  74. access to only one database to do this.
  75. Once this user is configured and the DBAddr line is configured in
  76. server/etc/indexer.conf, you can create the database structure by
  77. calling (on the indexing server):
  78. indexer -Ecreate indexer.conf
  79. The next step is to create a Dokeos user for the purpose of indexing
  80. your courses (the user needs access to all courses to be able to index
  81. them). Create a simple user in the Dokeos administration interface. Then
  82. get his ID (you can get it by hovering the edition icon in the users
  83. list: the user id is the number that shows after "user_id" in the URL)
  84. and use it inside indexer_login.php to replace the 'xxx' value.
  85. Also configure the IP address and the host name of the indexing server
  86. inside this file.
  87. Once these two steps are complete, you can start the first indexation
  88. of your portal, by calling, on the command line of your indexing server:
  89. indexer -N10 index.conf
  90. N10 lets you limit the number of simultaneous threads that your indexing
  91. server will be allowed to use. More than 10 might put your Dokeos portal
  92. in overload. You might want to reduce this number to 3 for light servers.
  93. 5. Installing the plugin
  94. ------------------------
  95. Installing the plugin is done by dispatching the files contained in
  96. this plugin as described in "2. Installing files", and configuring the
  97. various *.conf.php files as well as server/etc/indexer.conf and
  98. server/www/search.xml.php
  99. Once the files have been moved and configured, you will still need to
  100. index some data, then activate the plugin inside the Dokeos
  101. administration panel. Then, basically, you should be able to use
  102. the plugin straight away.
  103. 6. International use
  104. --------------------
  105. To keep this plugin small, we had to remove a considerable amount of
  106. international-parsing helper files. If you need one for your language,
  107. it may well be included in the default installation file for the
  108. Debian mnogosearch-common package.
  109. If not, you should check more recent versions of mnogosearch on its
  110. website: http://www.mnogosearch.org/
  111. 7. Seek help
  112. ------------
  113. Commercial suppport is available for the configuration and remote use
  114. of this plugin at info@dokeos.com
  115. If you have plenty of time to learn it by yourself or any other reason,
  116. you might find some free help on our forums: http://forum.chamilo.org