VuFind with Ubuntu
This is an old version. Please view the updated post at http://techview.wordpress.com/2007/10/30/vufind-06-on-ubuntu-710/
A beta release VuFind was recently released as an ILS replacement by Villinova. However, getting it to run properly on my virtualized server was a bit of an adventure. So, in order to spare others, here are some development notes for installing VuFind 0.5 on Ubuntu.
Most of this you can copy and past into a bash script (in fact, that’s where I put most of this stuff). As soon as I get a chance, I’m going to build an installer for this, but in the mean time:
Upgrade your distribution:
sudo apt-get -y dist-upgrade
Install some needed base packages
sudo apt-get -y install subversion ssh build-essential sun-java5-jdk
You can use the sun-java6-jdk, just make sure to update the code further down that sets the JAVA_HOME variable.
Next, install and configure Apache2 to use mod_rewrite
sudo apt-get -y install apache2
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled
sudo /etc/init.d/apache2 reload
Currently, the subversion repository doesn’t have all the files to run Tomcat, so you need to grab both
svn co https://vufind.svn.sourceforge.net/svnroot/vufind /usr/local/vufind
wget http://downloads.sourceforge.net/vufind/VUFind-0.5.tgz?use_mirror=osdn
tar -zxvf VUFind-0.5.tgz
cd VUFind-0.5
sudo rm -rf /usr/local/vufind/solr
sudo mv solr /usr/local/vufind
Next, change the permissions on the cache and compile folders
chown www-data:www-data /usr/local/vufind/web/interface/compile
chown www-data:www-data /usr/local/vufind/web/interface/cache
Install and configure MySQL
sudo apt-get -y install mysql-server
mysqladmin -u root create vufind
Install and configure PHP 5 and the required libraries
sudo apt-get -y install php5 php-pear php5-ldap php5-mysql php5-xsl php5-pspell aspell aspell-en
Note, this doesn’t include the PDO_OCI library for dealing with Oracle. You’ll need to grab that one if you need it.
Install YAZ (updated 8/1/07)
sudo apt-get -y install yaz
Build YAZ from the source files
wget http://ftp.indexdata.dk/pub/yaz/yaz-3.0.8.tar.gz
tar -zxvf yaz-3.0.8.tar.gz
cd yaz-3.0.8
./configure
make
sudo make install
There’s an issue with the default version of PEAR installed with PHP on Ubuntu and you’ll need to upgrade this…
sudo pear upgrade PEAR
You may also want to edit the install script that’s included in the package to read
mv Smarty-2.6.18/libs* $PHPDIR/Smarty
You’ll need to set up Apache and MySQL still…
In /etc/apach2/apache2.conf add the following lines:
Alias /vufind /use/local/vufind/web
<Directory /use/local/vufind/web/>
AllowOverride ALL
Order allow,deny
allow from all
</Directory>
and reload
sudo /etc/init.d/apache2 reload
Now set up your JAVA_HOME environmental variable. Since this is a global (at least for me), I put it in /etc/environment
JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"
Note, if you just the sun-java6-jdk, be sure to change the above line to
JAVA_HOME="/usr/lib/jvm/java-6-sun"
You can run source on this file to pick up the variable, but because you’ll probably sudo in a development environment, it’s probably easier just to reboot the system.
Lastly, set up MySQL data tables
mysql -u root
GRANT ALL ON vufind.* TO vufind@localhost IDENTIFIED BY "secretPassword";
quit
mysql -u vufind -p vufind < mysql.sql
This is a change from the provided documentation as it creates a new user (so you’re not running the database as root). Also, you’ll want to be sure to change the default root password of nothing to something other than that.
Now, if everything has gone nicely, you should be able to run the Solr server now. You do have to be in the /usr/local/vufind directory in order for this to start properly.
cd /usr/local/vufind
./solr/tomcat/bin/startup.sh
Make sure everything is running now. Check out your systems at
http://your.ip.address:8080/solr/admin
http://your.ip.address/vufind
Lastly, a small change in running the yaz-marcdump from the example. The utillity will be happier with
yaz-marcdump -f MARC-8 -t UTF-8 -X marcFile.mrc > catalog.xml
if you’ve installed the debian package. If you’ve installed from the source, use the example code
yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml records.marc > catalog.xml
Hopefully this will save some folks some hunting…
July 30, 2007 at 5:20 pm
Great How To!!!
Can you send me an email with the items that are missing from Tomcat in SVN? I tried to include as much as necessary but it seems something is missing.
Also, i fixed the install script to move Smarty into the correct directory.
I will post this up on the vufind website. Thanks for publishing this!
August 1, 2007 at 1:22 pm
I’m going through this process myself, which version of Ubuntu did you use? I’m currently starting over from scratch with 6.06 Server.
August 1, 2007 at 3:45 pm
I’m using Feisty (7.04). There are some advantages to running the Feisty version, and you can upgrade the system with
sudo apt-get dist-upgrade
Also, if you’re doing this in VMWare, make sure you give the volume enough room to hold all the generated records and the collection of files. I was running this on 1.8 million and ran out of space on the 15Gb I allocated.
August 17, 2007 at 12:36 pm
Great instructions, thanks!
But, I get here:
cd /usr/local/vufind
./solr/tomcat/bin/startup.sh
and the file can’t be found. there is not tomcat folder in the solr directory
August 17, 2007 at 1:54 pm
John, I just responded to you on the list about this, but for others that stumble on this, this post is for the .5 release. The .6 release changed its Java servlet container from Tomcat to Jetty, so most of this info is not valid. I’ll post an update soon…
August 27, 2007 at 12:42 pm
To connect to a voyager ils, will I need to install the Oracle instant client on my ubutu box?
You say that the PDO_OCI library is also needed. Can you point me to install instructions?