====== Vufind 0.8.2 on Ubuntu 8.04 ====== You can //mostly// script the installation of Vufind on Ubuntu. The following details the installation from a "clean" instance of Ubuntu Server. The first step is to make sure you have the latest patches installed. sudo apt-get dist-upgrade Next, install SSH and the JDK 6 on the server. sudo apt-get -y install sun-java6-jdk While you're installing Java, you'll be prompted to accept the user license. Note: You can run the Jetty server with the JRE, but in order to ensure that your server can run with the "-server" to enable server heuristics, you need to install the JDK. ===== Apache2 ===== Vufind needs to run PHP, for the purposes here we'll use Apache2. sudo apt-get -y install apache2 sudo a2enmod rewrite sudo /etc/init.d/apache2 force-reload ===== PHP ===== sudo apt-get -y install php5 php5-dev php-pear php5-ldap php5-mysql php5-xsl php5-pspell aspell aspell-en ==== PHP OCI Driver for Oracle ==== There are a few steps if you need to install the OCI8 libraries. First, upgrade pear to the latest version((see [[http://www.itslot.com/oci8_php5_ubuntu|adapted from pipe's blog]])). sudo pear upgrade pear Now, you need to get the [[http://www.oracle.com/technology/software/tech/oci/instantclient/index.html|Oracle Instant Client]] (at a minimum you need Basic and SDK zip pages). sudo mkdir -p /opt/oracle cd /opt/oracle # download/move the client libraries to /opt/oracle sudo unzip basic.zip sudo unzip sdk.zip # make a symlink to make upgrading easier sudo ln -s instantclient_11_1 instantclient There are some symlinks that need to be made in the actual folders... cd /opt/oracle/instantclient sudo ln -s libclntsh.so.10.1 libclntsh.so sudo ln -s libocci.so.10.1 libocci.so Now add the Instant Client to the system dynamic library loader. echo /opt/oracle/instantclient > /etc/ld.so.conf.d/oracle-instantclient Now compile and install the OCI8 package with PECL sudo pecl install oci8 Note, you will be prompted for the instantclient directory, so when you're prompted, just enter /opt/oracle/instantclient Now install the PHP extension and restart Apache sudo echo extension=oci8 >> /etc/php5/apache2/php.ini sudo /etc/init.d/apache2 restart ===== MySQL ===== sudo apt-get -y install mysql-server ===== Vufind ===== Now for the fun part! cd /tmp wget http://downloads.sourceforge.net/vufind/vufind-0.8.2.tar.gz?big_mirror=0 tar zxvf vufind-0.8.2.tar.gz sudo mv vufind-0.8.2 /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 sudo chmod +x /usr/local/vufind/vufind.sh ===== Apache Settings ===== We need to add a couple of settings to Apache in order to make sure everything will run properly. In the /etc/apache2/apache2.conf file, add the following: Alias /vufind /usr/local/vufind/web AllowOverride ALL Order allow,deny allow from all Now, reload sudo /etc/init.d/apache2 reload ==== Environmental Variables ==== There are a few environmental variables that need to be set. You can set these for the user running the service, or in /etc/profile if you're lazy. export JAVA_HOME="/usr/lib/jvm/java-6-sun" export VUFIND_HOME="/usr/local/vufind" ==== Install Script ==== sudo /usr/local/vufind/install ====== A (Mostly) Scripted Default Installation ====== You can use this script to (mostly) install everything to get Vufind running on Ubuntu. Just save this script as ubuntu_setup.sh. sudo sh ubuntu_setup.sh #!/bin/bash # Script for installing Vufind 0.8.2 on Ubuntu # This does not include the OCI8 libraries # Set some variables VUFIND_URL="http://downloads.sourceforge.net/vufind/vufind-0.8.2.tar.gz?big_mirror=0" VUFIND_HOME="/usr/local/vufind" # Update the system and install software sudo apt-get dist-upgrade sudo apt-get -y install sun-java6-jdk apache2 php5 php5-dev php-pear php5-ldap php5-mysql php5-xsl php5-pspell aspell aspell-en mysql-server # enable mod_rewrite sudo a2enmod rewrite # set up Apache for Vufind and reload configuration sudo /etc/init.d/apache2 force-reload # download Vufind cd /tmp wget $VUFIND_URL tar zxvf vuvind-0.8.2.tar.gz sudo mv vufind-0.8.2 $VUFIND_HOME sudo chown www-data:www-data $VUFIND_HOME/web/interface/compile sudo chown www-data:www-data $VUFIND_HOME/web/interface/cache sudo $VUFIND_HOME/install