#!/bin/bash # Script for installing VuFind 2.x on Ubuntu # This does not include the OCI8 libraries # Update the profile file to set required environment variables (unless they are # already defined there): grep -q JAVA_HOME= /etc/profile if [ $? -ne 0 ]; then sudo sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" >> /etc/profile' fi grep -q VUFIND_HOME= /etc/profile if [ $? -ne 0 ]; then sudo sh -c 'echo export VUFIND_HOME=\"/usr/local/vufind2\" >> /etc/profile' fi grep -q VUFIND_LOCAL_DIR= /etc/profile if [ $? -ne 0 ]; then sudo sh -c 'echo export VUFIND_LOCAL_DIR=\"$VUFIND_HOME/local\" >> /etc/profile' fi source /etc/profile # Turn on mod_rewrite in Apache. sudo a2enmod rewrite # Set permissions so Apache can write to certain directories. sudo chown -R www-data:www-data $VUFIND_LOCAL_DIR/cache sudo chown -R www-data:www-data $VUFIND_LOCAL_DIR/config # set up Apache for VuFind and reload configuration sudo ln -s $VUFIND_LOCAL_DIR/httpd-vufind.conf /etc/apache2/conf.d/vufind sudo /etc/init.d/apache2 force-reload # Finalize the installation cd $VUFIND_HOME sudo php install.php --use-defaults