Horizontal Navigation

Tuesday, 20 June 2017

Install Vufind for Library Discovery Service in Ubuntu 16.04

1. Install Apache HTTP Server

The following lines accomplish three things: the first line installs Apache, the second line turns on the URL rewriting module required by VuFind, and the third line restarts the server to activate the newly-installed module.
(i) Install the Apache web server for communication between VuFind and web browsers.
Use following command:
sudo apt-get install apache2
(ii)rewriting module required by VuFind. Use following command:
sudo a2enmod rewrite
(iii)Restart the Apache server to activate the newly-installed module. 
Use following command:
sudo /etc/init.d/apache2 restart

2. Install MySQL

VuFind uses the MySQL database for storing user comments, tags and other information. To install MySQL Server, use the following command:
sudo apt-get install mysql-server
Note: During installation, you will be prompted for a MySQL root password. Remember this password

3. Install PHP

Use the following command:
sudo apt-get install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mcrypt php-mysql php-xml

4. Install the Java JDK

Then install JDK (the Java Development Kit) on the server – VuFind's searching back-end and MARC indexing tools rely on Java.
sudo apt-get install default-jdk

5. Download VuFind:

Use the following command:
(i) cd /tmp
(ii) wget http://downloads.sourceforge.net/vufind/vufind-3.1.3.tar.gz?use_mirror=osdn -O vufind-3.1.3.tar.gz
(iv) tar xzvf vufind-3.1.3.tar.gz
(iv) sudo mv vufind-3.1.3 /usr/local/vufind

6. Install VuFind

Use the following command for installing VuFind:
(i) cd /usr/local/vufind
(ii) php install.php

You should also set some permissions to allow Apache to write configuration and cache files to disk:
(iii) sudo chown -R www-data:www-data /usr/local/vufind/local/cache
(iv) sudo chown -R www-data:www-data /usr/local/vufind/local/config
If you plan to use VuFind's command line tools, you also need a separate cache for that:
(v) mkdir /usr/local/vufind/local/cache/cli
(vi) sudo chmod 777 /usr/local/vufind/local/cache/cli

Apache needs to have some extra VuFind settings loaded. Run this command to make Apache aware of VuFind's configuration file:
(i) sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf
Apache needs to be restarted so the changes can take effect:
(ii) sudo /etc/init.d/apache2 reload

8. Set Up Environment Variables

Run the following commands in terminal for setting up Environment Variables:
sudo sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" > /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_HOME=\"/usr/local/vufind\"  >> /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_LOCAL_DIR=\"/usr/local/vufind/local\"  >> /etc/profile.d/vufind.sh'
Then to make it executable/effect, run the following command:
source /etc/profile.d/vufind.sh

9. Final Configuration

(i) Start Sol: To start VuFind's Solr index, use the following command:
cd /usr/local/vufind/
./solr.sh start

(ii) Configure VuFind: 

Open a web browser, and browse to this URL: 

http://localhost/vufind/Install/Home

Then Enjoy Discovery Service using VuFind.

Reference:
https://vufind.org/wiki/installation:ubuntu

No comments:

Post a Comment