Sample configurations

Hope this helps you on the way to get a working Emilda environment. If you experience difficulties, you can always ask via the Mailing lists.

Sample Apache Directory

This is a sample Directory for Apache. Do not use directly, but alter with the help of the description below.

<Directory /var/www/emilda>
	AddHandler cgi-script .cgi .pl
	php_value include_path .:lib
	AllowOverride All
	Options ExecCGI FollowSymLinks
	Order allow,deny
	Allow from all
	<Files "*.inc">
		Order allow,deny
		Deny from all
	</Files>
</Directory>

Sample Apache VirtualHost

This is a sample VirtualHost for Apache. Do not use directly, but alter with the help of the description below.


<VirtualHost *>
	ServerName emilda.example.com
	ServerAdmin webmaster@example.com
	DocumentRoot /var/www/emilda
	AddHandler cgi-script .cgi .pl
	php_value include_path .:lib
	<Files "*.inc">
		Order allow,deny
		Deny from all
	</Files>
	<Location "/">
		AllowOverride All
		Options ExecCGI FollowSymLinks
		Order allow,deny
		Allow from all
	</Location>

	CustomLog logs/Emilda.log combined
</VirtualHost>

Sample VirtualHost Description

<VirtualHost *>

Declares the beginning of the VirtualHost. Replace * with the IP of your server if you want Apache to specify this VirtualHost to only a specific IP. (Can be useful if your server is accessible via multiple IPs)

ServerName emilda.example.com

Declares the name of the VirtualHost, i.e. the domain name that Emilda will be accessed with. This domain must exist!

ServerAdmin webmaster@example.com

The email address of the person responsible for this VirtualHost. Will be visible if server fails.

DocumentRoot /var/www/emilda

The full path to the Emilda source folder

AddHandler cgi-script .cgi .pl

Allows execution of Perl/CGI scripts outside the cgi-bin-directory

php_value include_path .:lib

Declares a PHP-value defining the location of Emilda includes

<Files "*.inc">
    Order allow,deny
    Deny from all
</Files>

Deny access to all .inc filed via Apache for security reasons

<Location "/">
    AllowOverride All
    Options ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all

</Location>

Allow the execution of Perl/CGI scripts in the Emilda source folder and sub-folders and deny listing of files.

CustomLog logs/Emilda.log combined

Specify Apache to separate the access log of this VirtualHost from the others. The path can be which ever, but be sure that apache has write access there

</VirtualHost>

End VirtualHost declaration

Sample Zebra Configurations

Below are some directives how to configure Zebra to comply with Emilda in an acceptable manner.

The first thing to be done is to decide where the Zebra folder is to be located. If you do not have any particularly good reason why not to put this folder as a subfolder of the Emilda source folder, we recommend that you put it as a subfolder of the Emilda source folder named zebra/.

What you need to put into this folder, is the sample USMARC configuration supplied with the Zebra source. If you feel familiar with the Zebra configuration you can of course customize this process. For more information on where to locate the USMARC configuration samples, please consult the README supplied with the Zebra source.

Now we have a working environment where the "zebrasrv"-process can live and work, but this is not enough for Emilda as Emilda uses attributes that are not defined in the default configuration supplied with Zebra. That is why we have supplied a tarball containing all the files that need to be replaced in Your Zebra root folder and it can be downloaded here. Unpack the tarball in some arbitraty location, and copy the files to their appropriate locations (see below).

  • zebra.cfg - The Zebra root folder (/path/to/emilda/zebra/zebra.cfg)
  • bib1.att - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/bib1.att)
  • usmarc.abs - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.abs)
  • usmarc.tag - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.tag)

Before starting Zebra, we need to create a folder where the MARC-records are to be stored. In our examples it is named records/ and it is located in the Zebra root folder (/path/to/emilda/zebra/records/). What is important with this folder is that both the Zebra process and Apache need to have write access to this folder. This can be achieved e.g. by running the "zebrasrv"-process as the Apache user and only giving the Apache user write access to records/, or then give write access to records/ to both Apache and the user running the "zebrasrv"-process. There is no favourable way to do this; both work just as well.

After deciding on which method to use, we are ready to prepare zebra for running; zebra needs to init and index the records/ folder before we start the process. If you have any records that you wish to import into Emilda, you need to copy these into the records/ folder before running these commands. (If you afterwards want to import MARC-recods, you copy them into the recods/ folder and run these commands.)

  1. Go into the Zebra root folder: "cd /path/to/emilda/zebra/
  2. Init Zebra: "zebraidx init"
  3. Index the records/ folder: "zebraidx update recods"
  4. Start the zebrasrv-process: "zebrasrv @:9999"

This should give you a working environment where there are no anomalies regarding Zebra and Emilda interaction at least.

NOTE!
If the records/ folder is empty, there will be an error of the type

Unsupported Use attribute: 7

which should not show up after the first record has been added. If it persists, there is something odd going on; try to check if you have done everything according to the above instructions, or send a note to the Emilda mailing list.