Your First Harvest
In a perfect world, you should only have to harvest once then run your maintenance script to keep your database and index up-to-date. The next section will cover those maintenance tasks and how to automate them.
If everything has been configured correctly, running the initial harvest should be very simple. The harvest script is included in the Locum distribution. (/usr/local/lib/locum/tools/harvest.php). You will need to edit it to make sure all of the parameters are correct. You need to know the lowest bib number and highest bib number in your system now and plug them in here. You don't need to change $large_record_split.
// You'll need to change these:
$first_record = 1000006;
$last_record = 1284000;
$large_record_split = 10;
// Init scripts, library locations, and binaries
$locum_lib_dir = '/usr/local/lib/locum';
$mysql_init_script = '/etc/init.d/mysql';
$sphinx_init_script = '/etc/init.d/sphinx';
$sphinx_indexer = '/usr/local/sphinx/bin/indexer';
Once you have harvest.php configured properly, you'll make it executable and run it:
chmod +x /usr/local/lib/locum/tools/harvest.php
If you don't see any errors, things should be OK. You ought to make sure that the scrip is actually exporting records:
mysql> SELECT COUNT(*) FROM locum_bib_items;
It would be a good idea to go one step further and examine the data going in as well. If everything look OK, go get a cup of coffee, a meal, a good night's sleep and check it in the morning.
If the process completes without errors, great! You're almost there! You'll need to prep your index tables before indexing:
chmod +x /usr/local/lib/insurge/tools/update-index.php
ln -s /usr/local/lib/insurge/tools/update-index.php /etc/cron.hourly/locum
Finally, go and build your Sphinx index and start Sphinx:
You should now have SOPAC up and running!
All that is left to do now it tend to the maintenance responsibilities. I would go on to the next step once you have verified that SOPAC is indeed working properly and that you have a viable data set.