perlcompile
http://perldoc.perl.org/perlcompile.html
星期四, 9月 27, 2007
星期四, 9月 13, 2007
Zebra Configuration
http://www.emilda.org/index.php?q=node/36
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. We recommend that you put it as a subfolder (zebra/) of the Emilda source folder. One reason not to have it there is when the Zebra database is bigger than the disk that the Emilda source folder is located on. In such cases, it might be a good idea to put it on a separate drive.
There are two ways to configure Zebra to comply with Emilda; either configuring it from the example files supplied with the Zebra source, or using the pre-configured setup supplied with Emilda.
When configuring from the examples supplied with Zebra, you need to put the USMARC example files into your zebra-root. They are normally located in test/ under the idzebra source folder. Additionally you need to put the tab/ folder from the idzebra source folder into your zebra-root. You can of course use a custom setup if you feel familiar with Zebra configuration.
Now we have a working environment where the "zebrasrv"-process can live and work, but this is not enough for Emilda as it 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 from the same location you downloaded Emilda itself, named "emilda-zebra-folder-VERSION.tar.gz". 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)
If you want to use our pre-configured zebra environment, download the tarball and extract into the location where you want your zebra-root to exist. This tarball contains all necessary files for Zebra to work with Emilda, so no configuration should be needed.
Before starting Zebra, we need to create a folder where the MARC-records are to be stored. In our examples it is called 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 it. 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 by giving 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.) However, remember that the Items that the records in the records/ folder represent need to be added into the SQL database before Emilda can use them.
1. Go into the Zebra root folder: "cd /path/to/emilda/zebra/
2. Init Zebra: "zebraidx init"
3. Index the records/ folder: "zebraidx -g emilda update records"
4. Commit results into shadow: "zebraidx commit"
5. Start the zebrasrv-process: "zebrasrv -l /path/to/log @:9999"
This should give you a working environment with Emilda and Zebra.
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.
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. We recommend that you put it as a subfolder (zebra/) of the Emilda source folder. One reason not to have it there is when the Zebra database is bigger than the disk that the Emilda source folder is located on. In such cases, it might be a good idea to put it on a separate drive.
There are two ways to configure Zebra to comply with Emilda; either configuring it from the example files supplied with the Zebra source, or using the pre-configured setup supplied with Emilda.
When configuring from the examples supplied with Zebra, you need to put the USMARC example files into your zebra-root. They are normally located in test/ under the idzebra source folder. Additionally you need to put the tab/ folder from the idzebra source folder into your zebra-root. You can of course use a custom setup if you feel familiar with Zebra configuration.
Now we have a working environment where the "zebrasrv"-process can live and work, but this is not enough for Emilda as it 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 from the same location you downloaded Emilda itself, named "emilda-zebra-folder-VERSION.tar.gz". 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)
If you want to use our pre-configured zebra environment, download the tarball and extract into the location where you want your zebra-root to exist. This tarball contains all necessary files for Zebra to work with Emilda, so no configuration should be needed.
Before starting Zebra, we need to create a folder where the MARC-records are to be stored. In our examples it is called 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 it. 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 by giving 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.) However, remember that the Items that the records in the records/ folder represent need to be added into the SQL database before Emilda can use them.
1. Go into the Zebra root folder: "cd /path/to/emilda/zebra/
2. Init Zebra: "zebraidx init"
3. Index the records/ folder: "zebraidx -g emilda update records"
4. Commit results into shadow: "zebraidx commit"
5. Start the zebrasrv-process: "zebrasrv -l /path/to/log @:9999"
This should give you a working environment with Emilda and Zebra.
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.
星期日, 9月 02, 2007
Slides from conference presentations
Scaling MySQL and PHP by Jeremy Zawodny, presented at the 2002 PHP Conference
http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html
Managing MySQL Replication by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/managing-mysql-replication.html
MySQL Backup and Recovery by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-backup-and-recovery.html
MySQL Optimization by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-optimization.html
http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html
Managing MySQL Replication by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/managing-mysql-replication.html
MySQL Backup and Recovery by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-backup-and-recovery.html
MySQL Optimization by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-optimization.html
MySQL Cluster
MySQL Cluster: Two webserver setup
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html
Advanced MySQL Replication Techniques
http://dev.mysql.com/tech-resources/articles/advanced-mysql-replication.html
Chapter 16. MySQL Cluster
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
Getting started with MySQL Proxy
http://dev.mysql.com/tech-resources/articles/proxy-gettingstarted.html
A.14.4. DRBD and MySQL Replication
http://dev.mysql.com/doc/refman/5.1/en/drbd-virtualization.html
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html
Advanced MySQL Replication Techniques
http://dev.mysql.com/tech-resources/articles/advanced-mysql-replication.html
Chapter 16. MySQL Cluster
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
Getting started with MySQL Proxy
http://dev.mysql.com/tech-resources/articles/proxy-gettingstarted.html
A.14.4. DRBD and MySQL Replication
http://dev.mysql.com/doc/refman/5.1/en/drbd-virtualization.html
訂閱:
文章 (Atom)