VuFind is a library resource portal designed and developed for libraries
 by libraries. The goal of VuFind is to enable your users to search and 
browse through all of your library's resources by replacing the 
traditional OPAC.
I. Install php
   sudo apt-get -y install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap 
 
II. Installation of Vufind
 a. Download vufind
sudo su
 cd /tmp
wget https://github.com/vufind-org/vufind/releases/download/v7.0.1/vufind_7.0.1.deb
sudo dpkg -i vufind_7.0.1.deb
sudo mv vufind-7.0.1 /usr/local/vufind 
 
b. Install vufind
cd /usr/local/vufind
php install.php
 
##set some permissions to allow Apache to write configuration and cache files to disk: 
 
sudo chown -R www-data:www-data /usr/local/vufind/local/cache
sudo chown -R www-data:www-data /usr/local/vufind/local/config 
 
Note: (not mandatory) If you plan to use VuFind's command line tools, you also need a separate cache for that
 
 
mkdir /usr/local/vufind/local/cache/cli
sudo chmod 777 /usr/local/vufind/local/cache/cli
 
c. Linking with Apache and setting up environment variables
 
sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf
sudo /etc/init.d/apache2 reload 
 
##Settingup environment variable
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' 
d. final configuration
##After creating the file, you must load it manually for the changes to take effect without forcing you to log out and back in again:
 
source /etc/profile.d/vufind.sh 
III.Configuring and Starting VuFind
a. Start Solr
cd /usr/local/vufind/
./solr.sh start
 
b. Open a web browser, and browse
 
http://your-server-name/vufind/Install/Home
 
Note: If you don't want to have to manually start and stop Solr every time you
 turn on or shut down your server, you can set it up to run 
automatically. 
edit the file
sudo gedit /etc/init.d/vufind 
 copy and paste the following line 
 #!/bin/sh
### BEGIN INIT INFO
# Provides: vufind
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: VuFind init script
### END INIT INFO
cd /usr/local/vufind
./solr.sh $*
 
then, Make the script executable
chmod +x /etc/init.d/vufind
Add the script to the Ubuntu startup
update-rc.d vufind defaults
 
Solr commands
service vufind start
service vufind stop
service vufind restart
service vufind check 
 
IV. Connecting koha with vufind
 
a. Indexing Koha with VuFind
Copy your marc_local.properties
cp /usr/local/vufind/import/marc_local.properties /usr/local/vufind/local/import/ 
b. Add following line in the file,
        id = 999c, first
$ sudo gedit /usr/local/vufind/local/import/marc_local.properties
 
      #collection = "collection"
       institution = "My University"
      #building = "Library A"
       id = 999c, first 
 
c. set driver for koha
$sudo gedit /usr/local/vufind/local/config/vufind/config.ini 
 
Make sure that following lines in the file, 
 
 [Catalog]
driver = "Koha" 
d. change koha connection set up
$sudo gedit /usr/local/vufind/local/config/vufind/Koha.ini
 
[Catalog]
host        = localhost
port        = 3306
username    = mysqluser
password    = mysqlpass
database    = koha_database
url         = http://library.myuniversity.edu/
[Location_Codes]
AV          = "Audio Visual"
CART        = "Book Cart"
CHILD       = "Children's Area"
DISPLAY     = "On Display"
FIC         = "Fiction"
GEN         = "General Stacks" 
 
Note:The Koha username may not be the MySQL root user.  It is safest to have 
an alternate user for such things.  This MySQL user needs to have access
 to the Koha database.
The MySQL password should be the MySQL password that corresponds to the 
MySQL username.  If you want to test this, from the command line you can
 run: 
$mysql -u [mysqluser] -p [kohadatabase] 
 
 
e. Export MARC record
Open Koha Go to Tool > Export Data 
koha.mrc will be downloaded
Import into VuFind
cd /usr/local/vufind
./import-marc.sh koha.mrc 
 
 
f. Restart solr
cd /usr/local/vufind/
./solr.sh status