Vufind 0.6 on Ubuntu 7.10

Update: The instructions on installing Vufind have been moved to the Vufind Wiki. Please check there for the most up-to-date instructions.

This is an update to my previous post on configuring Ubuntu to run Vufind…

First, upgrade your server distribution to the latest-and-greatest

sudo apt-get dist-upgrade

If you’re on Edgy (7.04), this may take a while. Next install the Java 6 JDK and build-essential (for building Yaz).

sudo apt-get -y install sun-java6-jdk build-essential

When you’re prompted, answer the questions and let Ubuntu finish setting up Java. As a side note, the reason you want the JDK and not the JRE is that we want to run the Solr instance with a server switch to improve the performance. To do this, you need to the JDK.

Next, we install Apache2 and configure the mod_rewrite extension (and reload Apache2):

sudo apt-get -y install apache2
sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload

Now, to download Vufind:

wget http://downloads.sourceforge.net/vufind/VuFind-0.6.1.tar.gz?use_mirror=superb-east
tar zxvf VuFind-0.6.1.tar.gz

Now, we need to move the Vufind files to the proper location. By default this should be /usr/local/vufind. If you choose a different location, you’ll need to set an environmental variable for VUFIND_HOME that points to your installation location, but I’ll get more into that a bit later. You also need to change the permissions on the compile and cache folders in the web/interface folder.

sudo mv vufind-0.6.1 /usr/local/vufind
sudo chown www-data:www-data /usr/local/vufind/web/interface/compile
sudo chown www-data:www-data /usr/local/vufind/web/interface/cache

Now to work install MySQL

sudo apt-get -y install mysql-server

PHP5 is required for Vufind with several dependencies.

sudo apt-get -y install php5 php5-dev php-pear php5-ldap php5-mysql php5-xsl php5-pspell aspell aspell-en

I don’t have an Oracle backend, so I haven’t tested the installation of the pdo-oci driver listed in the “official” documentation, but this page will hopefully walk you through installing the driver.

Lastly, we need the Yaz library.

cd /tmp
wget http://ftp.indexdata.dk/pub/yaz/yaz-3.0.14.tar.gz
tar -zxvf yaz-3.0.14.tar.gz
cd yaz-3.0.14
./configure
make
sudo make install

Ok, we’re now finished with adding the packages to get Vufind running. It’s time to run the installation script.

sudo /usr/local/vufind/install

You’ll be walked through the configuration of your Vufind instance. There’s a slight issue in the the database setup script as it assumes you haven’t set a root password (you actually set a password when you set up MySQL in Gutsy now). No biggy, just let the script run through the installation of the PEAR libraries and we’ll fix it with the following:

mysql -u root -p
GRANT ALL ON vufind.* TO vufind@localhost IDENTIFIED BY “secretPassword”;
quit

Now we need to edit a few files. First, we’ll edit /usr/local/vufind/web/conf/config.ini. The big sections that need editing are Site, Amazon, and Catalog (though you probably want to take a look at LDAP too). The Amazon id is your web services access id (not your affiliate ID) and you much change your drive to the appropriate driver that you’re using (e.g. Voyager, SirsiDynix, Koha, Evergreen, Aleph).

Next, the /usr/local/vufind/web/.htaccess file. You’ll need to change the rewrite base. And, you’ll most likely need to tweak the RewriteRule lines for your specific institution. The default is to use numeric call numbers, but if you’re like us, we have OCLC numbers, and many others. In case you’re not a RegEx expert, these are the settings I use:

RewriteRule ^([^/]+)/([a-zA-Z]*[0-9\s]+)/(.+)$
RewriteRule ^([^/]+)/([a-zA-Z]+[0-9\s]+)$
RewriteRule ^([^/]+)/([^0-9/]+)$

We’re almost there!

By default, the Ubuntu Apache2 distribution ignores .htaccess files, so we need to configure Apache to actually use the file. Edit the /etc/apache2/apache2.conf file with the following:

Alias /vufind /usr/local/vufind/web

<Directory /usr/local/vufind/web/>
AllowOverride ALL
Order allow,deny
allow from all
</Directory>

And reload Apache

sudo /etc/init.d/apache2 reload

Ok, let’s check to make sure that the interface is working before we do the final installation of the Solr backend. If you point your browser to http:<your_server>/vufind, you should see the default template. You should see a message on the page stating “Hey! You should customize this space.” If you see a message, you’ll need to do a little debugging (just read the message).

Ok, now for Solr. Vufind is packaged with Solr and Jetty. And, before we get going, we need to set an environmental variable JAVA_HOME. The way I do it is by adding the following line to /etc/profile

JAVA_HOME="/usr/lib/jvm/java-6-sun"
export JAVA_HOME

I always reboot, just to make sure that this really takes.

I forgot to change the permissions on startup script when I sent it to Andrew, so you need to make it executable

sudo chmod +x /usr/local/vufind/vufind.sh

And now to fire everything up

sudo /usr/local/vufind/vufind.sh start

Now, we want to make sure that Jetty and Solr start up all the time, so we create a symbolic link into /etc/init.d to the /usr/local/vufind/vufind.sh script and then run the update-rc.d script:

sudo ln -s /usr/local/vufind/vufind.sh /etc/init.d/vufind
sudo update-rc.d vufind defaults

Now, if everything went well, you should be able to check out the Solr interface at http://<your_server&gt;:8080/solr/admin.

With everything running, it’s time to create the index of marc records.

First, export your catalog holdings in marc format and put them in your /usr/local/vufind/import folder. The way I do this is I get the exported files and use scp to copy them to the user account and then sudo mv them to the location:

[On the ILS server]

tar czvf catalog.tar.gz catalog.mrc
scp catalog.tar.gz user@your.vufind.server:~

[On your Ubuntu server]

sudo mv ~/catalog.tar.gz /usr/local/vufind/import
tar zxvf /usr/local/vufind/import/catalog.tar.gz

Now, we need to create the MarcXML file:

sudo touch catalog.xml
sudo yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml catalog.mrc > catalog.xml
sudo php import-solr.php

This is a good time to take a coffee break…or a lunch break…or come back tomorrow ๐Ÿ˜‰ Seriously, the import takes a while. There are some big (ok, they’re HUGE) improvements in the speed in which the files are indexed in the Subversion branch, but those haven’t been officially tagged yet, so just be aware that while this is slow, it’s been significantly improved for future releases.

The only thing to do is to tune the JVM.

As always, if you have questions, leave a comment, or join the Vufind lists.

Advertisements
Explore posts in the same categories: Library 2.0, linux, solr, technology, Ubuntu, vufind

23 Comments on “Vufind 0.6 on Ubuntu 7.10”


  1. […] VuFind with Ubuntu This is an old version. Please view the updated post at https://techview.wordpress.com/2007/10/30/vufind-06-on-ubuntu-710/ […]

  2. Lev Says:

    great tutorial! but looks like a typo on the first command:

    sudo apt-get -y install dist-upgrade
    will produce an error

    should be:
    sudo apt-get -y dist-upgrade

  3. Wayne Graham Says:

    Lev,

    D’oh. Too much copying-and-pasting ๐Ÿ˜‰ I’ll make the change in the post so as not to confuse anyone.

  4. Lev Says:

    ๐Ÿ™‚ i know what you mean.

    Just one more thing, if you don’t mind, I had problems downloading VuFind using the link on your post. I ended up using Google on my laptop to find the link and use it on my test system. I just to wanted you know just in case someone else encounter the same thing.

    anyway keep on posting, you are definitely contributing a lot for the good of the community

  5. dan taylor Says:

    Thanks for creating this log – you have saved me time and energy by providing these great directions.

    Also, I had some trouble with the oci8 page you linked to to install the Oracle Instant Client. Although I had great success at:

    http://www.itslot.com/oci8_php5_ubuntu

  6. Paul Asay Says:

    Thanks for the notes, they are very helpful. Do you use Ex Libris Voyager system, and if so, any specific tips on making the connection to Voyager? Thanks Paul

  7. Wayne Graham Says:

    @Paul

    Sorry…we’re SirsiDynix. Take a look at the link Dan included to get the OCI8 driver running…

  8. Bill Wilkins Says:

    Is there a .mrc or bettera an already converted .xml file that is known to work as the vufind datasource?

    I do not have access to a catalog at the moment so I tried downloading various .mrc files from the web and then converting with yaz-marcdump, but with no luck when it came time to import. I’m assuming the field were named differently than schema.xml. Could someone post part of their catalog? I’d just like to test vufind…so a working catalog.xml would be great

    For debugging purposes it would be nice if a sample was included in svn

    Thanks!

  9. Wayne Graham Says:

    @Bill,

    Your right. I was going to add a small sample of marc records for unit testing, which could be used as a test run. I’ll try to get a small sample (like 1,000?) in there later today.

    Wayne

  10. Bill Wilkins Says:

    Thanks Bill – should I look for it in subversion?

  11. Bill Wilkins Says:

    er, “Thanks Wayne – should I look for it in subversion?”

  12. Wayne Graham Says:

    Sorry Bill…got side tracked this week and forgot about this. I just added a small marc file (8 records; it’s actually the marc test file from the marc4j library) into the subversion repo. It’s a file that I’m going to use for the unit tests for the Java indexing, but you can use it for testing too. The path from the trunk is import/java/src/org/vufind/test/resources/brkrtest.mrc (or you can follow this link:
    https://vufind.svn.sourceforge.net/svnroot/vufind/trunk/import/java/src/org/vufind/test/resources/brkrtest.mrc)

    Wayne

  13. Marc Davis Says:

    Thanks for this . . . my systems librarian handed it to me and said “make a test server for this.” Right.

    Anyway things have gone well, but for one issue. Hoping someone here might help me out.
    yaz-3.0.14.tar.gz was not available
    I installed yaz-3.0.20

    When I get to the command
    sudo yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml catalog.mrc > catalog.xml
    I get the error “yaz-marcdump: error while loading shared libraries: libyaz.so.3: cannot open shared object file: no such file or directory”
    libyaz.so.3 is located in /usr/local/bin

    any suggestions?
    Thanks —
    also posting this to the vufind list

  14. Wayne Graham Says:

    @Marc

    I stumbled on this a while back. I _should_ have written down what I did, but try this:

    sudo apt-get remove yaz*

    Then, reinstall yaz from source. Hopefully that’ll fix it…

  15. Marc Davis Says:

    Wayne . . .
    Thanks. That helped, sort of . . .

    When I ran the apt-get remove yaz* – no dice
    tried apt-get remove yaz (no asterisk) – no package to remove

    so, on a wild hair, I ran apt-get install yaz & installed 2 packages (libyaz2?)

    The yaz-marcdump command then executed and I’m now on to the import-solr step

    I should have copied down what I did exactly before running the import-solr step, obviously . . . cause now I can’t get back to the commands. ๐Ÿ™‚

    Not sure what I’ve done, but it seems to be working . . . heh.


  16. Very good tutorial. I think It’s better read the vufind tutorial here… ๐Ÿ™‚

    I already have a website for library, but I still don’t have a web-OPAC. Right now I like to try VuFind. But the problem is, that our library use Oracle for the database. I look at your tutorial, there was


  17. sorri….

    Very good tutorial. I think Itโ€™s better read the vufind tutorial hereโ€ฆ ๐Ÿ™‚

    I already have a website for library, but I still donโ€™t have a web-OPAC. Right now I like to try VuFind. But the problem is, that our library use Oracle for the database. I look at your tutorial, there was a marc converter.

    Is it always using marc? is it possible we use our database and then integrate with VuFind? Or maybe, we must export our database to marc format?

    Please, you can help me.

    Thank you

  18. Wayne Graham Says:

    @Agung

    The indexing requires actual marc formatted records, so you’ll need to export your holdings from Oracle into the marc format. After you get that, you can run the indexing and then connect Vufind to your Oracle back end. Depending on the actual backend, you may need to write your own driver, but it shouldn’t be too difficult (just look at the Voyager driver).

    Also, I encourage you to join the Vufind lists…there are a lot of folks there that get answers out pretty quickly. (http://vufind.org/support.php)


  19. @Wayne

    Thank you for your respon. I’m still newbie in database. Is there any software that can convert from our oracle field to marc format? or maybe tutorial how to do it?

    after I convert oracle to marc, is it possible I don’t use oracle again? how about book covers? where I must put this?

    About voyager driver? I look at google, I still can’t find this.

    After I finish my ubuntu server, and download all VuFind resources, I will sure join that list.

  20. Wayne Graham Says:

    @Agung

    If you’re using Voyager, there’s already a driver written to connect to your database. All you need to do is change the driver in the vufind/web/conf/config.ini file from Sample to Voyager.

    As for exporting your holdings, we’re a Sirsi site, so I can’t help you out too much there. But, there are a lot of folks on the Vufind lists that use Voyager who could help you out there.

  21. Shawn Romine Says:

    Hello!

    Thanks for this excellent post regarding vufind and ubuntu! I was browsing around and came across vufind, perfect timing as I just became the new Electronic Resources Librarian and one of my top tasks is to modernize our web catalog.

    We also use sirsi dynix, but I am having problems with the specific steps of exporting the data from sirsi in a format that can be used to import into vufind. Could you point me to some instructions that might assist me, or give me some guidance on how to do this?

    Once again, thanks for sharing this excellent resource!

  22. Kamal Says:

    I have installed vufind on ubuntu8.10. Now I tried to import MARC record in that but I found that some configuration must to be done in vufind/web/conf/config.ini. Can you help me what are all the changes has to be done to import record and I am very new to this open source so kindly mail the procedure to import record

  23. Wayne Graham Says:

    Hi Kamal,

    These directions are a bit stale…check out http://vufind.org/wiki/re-indexing to see how to create the index.

    Wayne


Comments are closed.


%d bloggers like this: