Simply. Elasticsearch is a server that can process JSON requests and give you back JSON data. Which is distributed as an open-source search and analytics engine built on Apache Lucene and developed in Java.
Update Debian using apt
sudo apt update && sudo apt upgrade -y
Install a few required packages not available with Debian.
sudo apt install -y gnupg software-properties-common dirmngr file-roller
Install JDK 11
sudo wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
sudo apt-get update
sudo apt-get install -y adoptopenjdk-11-openj9
Install ElasticSearch 6
sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update
sudo apt-get install -y elasticsearch
Enable Elasticsearch Service
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
You can start/stop ElasticSearch using these commands
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
Install MariaDB server
sudo apt install -y mariadb-server
Clear the apt-get packager manager cache
sudo apt clean
Securing MariaDB
Run this command to improve the security of the MariaDB installation:
sudo mysql_secure_installation
The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.
Add Koha community repository
sudo echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list
Add trusted repository key
sudo wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
Update software repository
sudo apt update
Install Koha and dependencies
sudo apt install -y koha-common
Takes 5 mins on a reasonably fast internet connection
Edit initial config file
sudo vim /etc/koha/koha-sites.conf
Edit INTRAPORT as 8080, OPACPORT as 80, domain, and Memcached [for database, makes Koha faster] settings depending on install
Ensure rewrite and cgi are enabled
sudo a2enmod rewrite cgi && sudo systemctl restart apache2
Setup the database for Koha
sudo koha-create --create-db library
Add new 8080 port (for IP based install) to Apache
sudo vim /etc/apache2/ports.conf
need to add Listen 8080 below Listen 80
Enable vhost on Apache
sudo a2dissite 000-default && sudo a2enmod deflate && sudo a2ensite library && sudo systemctl restart apache2
Test to ensure everything is working
In the web browser, visit http://127.0.0.1 {Koha maintenance message} and visit http://127.0.0.1:8080 It will prompt for username & password
username --> koha_library
password --> get it executing below command
sudo koha-passwd library
Restart Memcached Apache2 and MariaDB
sudo systemctl restart memcached apache2 mariadb
Enable Plack with Koha and Improve the Performance
sudo koha-plack --enable library && sudo koha-plack --start library
Configuration
Set the 'SearchEngine' system preference to 'Elasticsearch'
Restart server
sudo reboot
Reference:
https://wiki.koha-community.org/wiki/Elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html