Apache Solr is a profoundly adaptable, solid, and flaw tolerant open-source search apparatus written in Java. Solr targets giving dispersed ordering, replication, and burden offset questioning with robotized fail-over and recuperation, Apache Solr powers the hunt and route highlights of huge numbers of the world’s biggest web destinations. Right now, will see how to Install Latest Apache Solr on Ubuntu 19.04/18.04/16.04 and Debian 9.
In this post, We will install Apache Solr on ubuntu 16.04 and 18.04.
Step 1: Update System
You need to update the current ubuntu repository by using the following command.
sudo appt-get update
Step 2: Install Java
Apache Solr running in Java, So we need to install Java by using the given command.
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update -y
sudo apt-get install default-jre default-jdk -y
Step 3: Download Solr 8.2
You need to download the Apache solr 8.2 by using the given command.
cd /tmp
sudo wget https://archive.apache.org/dist/lucene/solr/8.2.0/solr-8.2.0.tgz
Step 4: Extract Solr 8.2
Now we have binary file of Apache Solr 8.2, To use it you need to extract and executive the installer script by using the command.
sudo tar xzf solr-8.2.0.tgz solr-8.2.0/bin/install_solr_service.sh --strip-components=2
sudo ./install_solr_service.sh solr-8.2.0.tgz
After installation of Apache Solr 8.2, You get running state of the service, To get the Apache Solr service use the following command.
sudo systemctl status solr.service
Step 5: Update UFW Firewall
By default Apache Solr using port 8983, To access from network Apache Solr Admin panel, You need to allow port 8983 by using the command.
sudo ufw allow 8983
sudo ufw reload
Step 6: Testing Solr
You need to open the browser with given URL to access the Apache Solr panel.
http://localhost:8983 or http://ip_address:8983
Step 7: Creating a Core
To save any kind of data in Solr, You need to create a core with any name and after that you can store your data from MariaDB, MongoDB and more, Use the given command for that.
sudo su - solr -c "/opt/solr/bin/solr create -c core_name_here -n data_driven_schema_configs"
How to install Apache Solr on ubuntu 16.04 and 18.04