Installing Locum

Setup of Locum is probably the most complex step in this installation process. This is because Locum must be configured to operate in your environment. Since every library is different, the actual organization and structure of configuration files can vary significantly between institutions.

What you will need

  • A list of material codes and their names
  • A list of location codes and their names
  • Your Amazon API access key (optional)
  • Your Syndetics customer ID token (optional)

Installation

First, you must install the Locum database schema:

mysql -u root -p < /usr/local/lib/locum/sql/scas_locum.sql

If you did not name your database 'scas', you will need to edit the schema file to reflect that.

Once you've verified that the schema has successfully imported, you will need to configure MySQL to initialize the Locum facet heap table. In your /etc/mysql/my.cnf (may be in a different location, depending on your distribution), add the following under the [mysqld] section:

max_heap_table_size = 200M
init_file = /usr/local/lib/locum/sql/locum_init.sql

Note: You may need to increase the memory allotment for your heap table if you have a lot of bibs.

Once you've done this, you can move on to configuring Locum. Locum's configuration options are located in its INI file: /usr/local/lib/locum/config/locum.ini.

Take some time to become familiar with the distributed INI file. Many of the options are self-explanatory, but several critical options may need some explanation.

The initial configuration section is fairly straight-forward. Be sure to create /usr/local/var/log if it does not exist. run_quiet forces locum to only use the log file and not stdout as well.

[locum_config]
dsn_file = "/usr/local/etc/scas_dsn.php"
log_file = "/usr/local/var/log/locum.log"
run_quiet = FALSE

You should not have to change these values if you installed Sphinx using this guide.

[sphinx_config]
api_path = "/usr/local/sphinx/lib"
server_addr = "localhost"
server_port = 3312

If you have pcntl enabled in PHP, you should not need to change this. You may want to come back and tweak it later. If you do not have pcntl enabled, you'll need to change harvest_with_children to FALSE. Your harvest time will be much greater without it, however.

[harvest_config]
harvest_with_children = TRUE
max_children = 10
harvest_reach = 1000

Setting up your API configuration is entirely optional. But you will need to enable either Syndetics or Amazon if you want to have cover images. Also, Locum uses Google for search suggestions. You can enable this here and tell Locum the number of search result under which to activate it. In this example here, Locum will try Syndetics for a cover image first, then Amazon.

[api_config]
use_amazon_images = TRUE
amazon_access_key = "786YBG8D7F6GO8DFN7B6"
amazon_img_prio = 2
use_syndetic_images = TRUE
syndetic_custid = "syndtid"
syndetic_img_prio = 1
use_google_suggest = TRUE
suggestion_threshold = 10

This section is critical in order for Locum to integrate with your ILS. It is where you determine which ILS connector to use and how to connect to your ILS server. Because this example uses the III connector, it will need to harvest on port 2082 (using xrecord). You will need to make sure the harvesting server has access to that port on your ILS server and that if there is a firewall between, it can pass through it.

[ils_config]
ils = "iii";
ils_version = "2006"
ils_server = "ils.yourlibrary.org"
ils_harvest_port = "2082"

The rest of the configuration file will be very specific to your organization. Read the commented sections carefully for instructions. Bear in mind that for purposes of the initial harvest, any sections below [ils_config] do not need to be completed yet. It is safe to "tweak them" once everything is up and running.