Install VuFind on Debian/Ubuntu

 

Tested with Debian 10 & Ubuntu 20.04 LTS 


Install LAMP Stack , Java JDK and necessory php extensions

sudo apt -y install apache2 mariadb-server default-jdk libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap php-curl && sudo a2enmod rewrites ; sudo systemctl restart apache2

sudo mysql_secure_installation

Download VuFind
Go to https://vufind.org/vufind/downloads.html and download latest version of VuFind (e.g. vufind-7.1.tar.gz

sudo wget https://github.com/vufind-org/vufind/releases/download/v7.1/vufind-7.1.tar.gz

Unzip the package (Right click on the package and select "Extract here". Otherwise apply following command in a terminal. Notice the version number; it will change when new version release.

sudo tar xzvf vufind-7.1.tar.gz

Move the folder to /usr/local/vufind (Notice the version number in following command)

sudo mv vufind-7.1 /usr/local/vufind

Install VuFind

cd /usr/local/vufind
php install.php

Permission to Apache to write configuration files

sudo chown -R www-data:www-data /usr/local/vufind/local/cache
sudo chown -R www-data:www-data /usr/local/vufind/local/config

Create cache for command line tools

sudo mkdir /usr/local/vufind/local/cache/cli
sudo chmod 777 /usr/local/vufind/local/cache/cli

Link VuFind to Apache

sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf

sudo systemctl restart apache2

Setup 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'


Load the environment manually

source /etc/profile.d/vufind.sh

Start Solr

VuFind using Solr search engine.

cd /usr/local/vufind/
./solr.sh start

Autostart Solr

Setting up auto start vufind using systemd, systemd is a set of tools shared across linux distributions which are focused on system and service management. Systemd is comparatively a new development in Linux, In earlier system it was used init.d, a symbolic links to a directory. sysmtemd gets ride of obscure bash scripts and replaces them with configuration files.

Create a user

sudo adduser solr --disabled-password

sudo chown -R solr:solr $VUFIND_HOME/solr/

ls -l $VUFIND_HOME/solr

sudo nano /etc/systemd/system/vufind.service

After=network.target

[Service]
Type=forking
ExecStart=/bin/sh -l -c '/usr/local/vufind/solr.sh start' -x
PIDFile=/usr/local/vufind/solr/vendor/bin/solr-8080.pid
User=solr
ExecStop=/bin/sh -l -c "/usr/local/vufind/solr.sh stop" -x
SuccessExitStatus=0
LimitNOFILE=65000
LimitNPROC=65000

[Install]
WantedBy=multi-user.target


sudo systemctl start vufind

Disable unix_socket plugin

sudo mysql -uroot -p
UPDATE mysql.user SET plugin='' WHERE User='root';
FLUSH PRIVILEGES;
quit

VuFind post installation configuration

http://127.0.1.1/vufind/Install/Home

 

Reference: 

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

http://kohageek.blogspot.com/2016/07/installation-vufind-on-ubuntu-debian.html

0 Komentar