.. include:: images.rst SOPAC2 Installation =================== .. _introduction-label: Introduction ------------------------------ This is an installation guide for SOPAC2 and its Koha connector. It has been tested on Debian Lenny and Ubuntu Jaunty with Drupal 6.12 and Koha 3.0.x. It does not cover the installation of Koha and Drupal, only SOPAC, its dependencies and the connector. .. _installation-of-locum-and-insurge-label: Installation of Locum and Insurge ----------------------------------------------------- Locum and Insurge are the two libraries used primarily by SOPAC. They serve as a layer of abstraction to the data. Insurge manages the social aspect (tags, reviews, ratings), while Locum manages the connection to the ILS via the connector. Both libraries use a different database from that of Drupal. .. _dependencies-label: Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are no packages for Debian MDB2 yet, you can install it via pear: :: # apt-get install php-pear # pear install MDB2 # pear install MDB2#mysql .. _download-label: Download ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Download the Locum and Insurge libraries from SVN: :: # cd /usr/local/lib # svn co http://dobby.darienlibrary.org/svn/locum/trunk/ locum # svn co http://dobby.darienlibrary.org/svn/insurge/trunk/ insurge .. _creation-of-the-database-label: Creation of the Database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: $ mysql -u root mysql> create database scas; mysql> grant all privileges on scas.* to scas_user@'localhost' identified by 'scas_pass'; mysql> flush privileges; mysql> exit .. _sync-dsn-label: Sync DSN ~~~~~~~~~~~~~~~~~~~~~~~~ This file will provide the connection information to a DB libraries: :: # nano /usr/local/etc/locum_insurge_dsn.php It should contain: :: tmpfile; mv tmpfile /usr/local/sphinx/etc/sphinx.conf # sed 's/locum_db_pass/scas_pass/g' /usr/local/sphinx/etc/sphinx.conf > tmpfile; mv tmpfile /usr/local/sphinx/etc/sphinx.conf And if you personalize the name of the database: :: # sed 's/scas/MY_DB/g' /usr/local/sphinx/etc/sphinx.conf > tmpfile; mv tmpfile /usr/local/sphinx/etc/sphinx.conf .. _indexing-documents-label: Indexing documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Indexing is necessary if you want to use the search features of SOPAC. You must first complete the Insurge table index :: # chmod +x /usr/local/lib/insurge/tools/update-index.php $ /usr/local/lib/insurge/tools/update-index.php Then start indexing Sphinx :: $ /usr/local/sphinx/bin/indexer --all Finally, we must start the daemon: :: # /etc/init.d/sphinx start When the daemon is running, you can update the index with: :: $ /usr/local/sphinx/bin/indexer --all --rotate .. _installation-of-sopac2-label: Installation of SOPAC2 ------------------------------------------ Now to the SOPAC software itself: .. _download-label: Download ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Download from SVN: :: $ cd /chemin/vers/drupal/sites/all/ $ mkdir modules $ cd modules/ $ svn co http://dobby.darienlibrary.org/svn/sopac/trunk/ sopac .. _installation-label: Installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In Drupal's administration settings, activate the module. Also, enable the dependencies: - Profile - PHP Filter - Path The Drupal menu should now list these entries. .. _configuration-label: Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Then go into the settings of SOPAC. - Configure the paths to the Locum and Insurge libraries - Choose a URL prefix SOPAC, in my "catalog". Create a node with content like: ::