#!/bin/bash # Script for installing VuFind on Ubuntu # This does not include the OCI8 libraries # Set environment variables for use below VUFIND_HOME=/usr/local/vufind VUFIND_LOCAL_DIR=$VUFIND_HOME/local # Turn on mod_rewrite in Apache. a2enmod rewrite # Set permissions so Apache can write to certain directories. chown -R www-data:www-data $VUFIND_LOCAL_DIR/cache chown -R www-data:www-data $VUFIND_LOCAL_DIR/config # Set up CLI cache. mkdir $VUFIND_LOCAL_DIR/cache/cli chmod 777 $VUFIND_LOCAL_DIR/cache/cli # Create the Apache configuration cd $VUFIND_HOME php install.php --use-defaults # Update the profile file to set required environment variables: sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" > /etc/profile.d/vufind.sh' cat $VUFIND_HOME/env.sh >> /etc/profile.d/vufind.sh # Set up Apache for VuFind and reload configuration APACHE_CONF_DIR=/etc/apache2/conf.d if [ ! -d $APACHE_CONF_DIR ]; then APACHE_CONF_DIR=/etc/apache2/conf-enabled fi ln -s $VUFIND_LOCAL_DIR/httpd-vufind.conf $APACHE_CONF_DIR/vufind.conf /etc/init.d/apache2 force-reload