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.
- Printer-friendly version
- Login or register to post comments



Comments
Re:
Thanks for sharing this valuable article. Great to read this.
best forex signals
Ubuntu & init_file for my.cnf
I'm about to try my first harvest and found that mysql on Ubuntu Server 8.10 has problems loading:
init_file = /usr/local/lib/locum/sql/locum_init.sql
My error in /var/log/syslog showed:
mysqld[8007]: 090204 17:16:39 [ERROR] /usr/sbin/mysqld: File '/usr/local/lib/locum/sql/locum_init.sql' not found (Errcode: 13)
However, the file was very much there.
I put the locum_init.sql file in a few locations and played with the permissions quite a bit. What worked for me:
1. Find the "datadir" line in your mysqld section of my.cnf and note the directory
2. Find the "user" line and make a note of the user
3. Copy locum_init.sql into the datadir directory
4. change the permissions of the file to be owned by your mysql user.
5. Restart and mysql should be cool.
I tried the basedir, tmpdir (didn't seem like a smart place to house a long-term file), and changing the permissions of the folders in the locum directory, the locum directory itself. This was the only solution that worked for me.
If anyone has any ideas or fixes for how I can keep the locum_init.sql file in the original locum directory without getting "File not found" errors I'd be happy to listen!
Brian
Did you ever resolve this?
Did you ever resolve this? It's definitely a permissions error:
percy:~# perror 13
OS error code 13: Permission denied
Maybe verify that each parent directory recursively has +x to the mysql user..
SOPAC installation - general
Gang,
Several items worth mentioning either not documented, or documentation is misleading or incorrect:
1) Installation refers to "/usr/local/lib..." for insurge and locum. However, the "SOPAC" Drupal module settings default to "/usr/local/include/...".
2) While the "locum.ini" file has a parameter for harvest port ("ils_harvest_port"), this is not used in the connectors, which are currently hardcoded to "8080". This was observed in the "sirsisopac" bundle.
3) The screen shot for setting "Permissions" shows 5 columns. The actual display using Drupal 6 shows only 2 columns ("anonymous user" and "authenticated user").
4) The use of the setting for "URL prefix refers to "catalog" in installation documentation, is delivered with "cat/seek".
5) No mention is made of either terms in "4" above. Are these used when installation occurs under a path such as "{DocumentRoot}/catalog"?
Bill
info
very interesting post, and helpful indeed, thanks!
administrator of booking
It's indeed a good post
Thanks for the step by step installation instructions. What is SEO
great article
great step-by step post! you saved my computer life, thanks!
your mademoiselle