This installation guide assumes that you have Drupal 6 up and running already. If you need help with that part of the process, head on over to drupal.org and get acquainted with the best open source CMS in the world.
While the SOPAC suite can be installed anywhere on your file system, it is recommended that you place the locum and insurge directories in /usr/local/lib. Your file tree would then look like:
/usr/local/lib/locum
/usr/local/lib/insurge
Once you have downloaded Insurge and Locum, you can extract and move them to the correct location:
tar zxvf locum-1.x.x.tar.gz
mv locum /usr/local/lib
tar zxvf insurge-1.x.x.tar.gz
mv insurge /usr/local/lib
You will also need to drop in the ILS connector you are using. As an example, if you are using the III connector, you would place the entire folder into the locum/connectors directory:
tar zxvf locum_iii_2006-1.0.0-beta1.tar.gz
mv locum_iii_2006 /usr/local/lib/locum/connectors
In addition, you should create a DSN directory that is external to your web root. This will contain the DSN that both Insure and Locum use. It's recommended that your DSN files reside in /usr/local/etc. If it doesn't exist:
mkdir /usr/local/etc
Once the DSN directory has been created, go ahead and create a new mysql database for Locum and Insurge to use. By default, Locum and Insurge assume that the name of the database is 'scas' (Social Catalog Application Suite). You can change this, of course, but you will then need to make sure it is updated appropriately in the distributed schema code.
While you're at it, you might as well create a user for the database as well.
mysql> create database scas;
mysql> grant all privileges on scas.* to scasuser@'localhost' identified by 'scaspassword';
mysql> flush privileges;
Of course, you can change 'scasuser' and 'scaspassword' to whatever you like. When you're done with this step, go ahead and create a file called 'scas.php' in your dsn directory and put the following in it (changing values as needed):
<?php
$dsn = 'mysql://scasuser:scaspassword@localhost/scas';
Once you're done with this step, you're ready to move on to the actual installation of the Sphinx full-text search engine.
Sphinx is an important component of the Locum library. It is well worth your time to read through the Sphinx documentation because you will be able to greatly customize it to exactly match your needs. Of course, Locum is distributed with a Sphinx configuration file that should work out of the box with very little modification.
Locum was designed to run on Sphinx 0.9.9, which can be downloaded here.
Also, make sure the following are installed on your system (package names may vary by Linux distribution. For more detailed information on these prerequisites, see the Sphinx home page):
Here are the recommended steps to get Sphinx installed (run as root):
cd ~
wget http://sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
tar zxvf sphinx-0.9.9.tar.gz
cd sphinx-0.9.9
./configure --prefix=/usr/local/sphinx
make
make install
Next, we'll make sure that the PHP API is available in the install tree. From the same source directory do:
mkdir /usr/local/sphinx/lib
cp api/sphinxapi.php /usr/local/sphinx/lib/
Next, you have to create a sphinx user, a PID directory and set the right ownership so we can install a nice init script ( !!! make sure you do '>>' and NOT '>'):
echo "sphinx:x:999:999:Sphinx User,,,:/usr/local/sphinx/:/bin/true" >> /etc/passwd
echo "sphinx:x:999:999:Sphinx User,,,:/usr/local/sphinx/:/bin/true" >> /etc/passwd-
echo "sphinx:x:999:" >> /etc/group
echo "sphinx:x:999:" >> /etc/group-
mkdir /usr/local/sphinx/var/run
chown -R sphinx.sphinx /usr/local/sphinx/var
cd /etc/init.d
wget http://www.thesocialopac.net/sites/thesocialopac.net/files/sphinx
chmod +x /etc/init.d/sphinx
Finally, you're going to copy the Locum-specific Sphinx configuration file into place.
cp /usr/local/lib/locum/sphinx/sphinx.conf /usr/local/sphinx/etc/
Once that's copied over, edit it, and replace all instances of "locum_db_user" and "locum_db_pass" with the MySQL username and password you set up in the initial preparation.
Sphinx should now be ready. We will do a little more with it when we get in to installing Locum.