Apache Solr is an opensource search platform written in Java. Solr provides full-text search, spell suggestions, custom document ordering and ranking, Snippet generation and highlighting. This tutorial will help you to install Apache Solr 7.5 on Debian 9 Stretch and Debian 8 Jessie.
Step 1 – Prerequsities
Apache Solr 7 required Java 8 or greater to run. Make sure your system fulfill Java requirements of Apache Solr. If you don’t have java installed on your system visit below articles.
java -version java version "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
If you don’t have java installed, Use this tutorial to install Java.
Step 2 – Install Apache Solr on Debian
Now download the required Solr version from its official site or mirrors. Or simply use the following command to download Apache Solr 7.5.0.
Now extract Apache Solr service installer shell script from the downloaded Solr archive file and run the installer using following commands.
tar xzf solr-7.5.0.tgz solr-7.5.0/bin/install_solr_service.sh --strip-components=2 sudo bash ./install_solr_service.sh solr-7.5.0.tgz
Step 3 – Manage Solr Service
Use the following commands to Start, Stop and check the status of Solr service.
sudo systemctl stop solr sudo systemctl start solr sudo systemctl status solr
Step 4 – Create First Solr Collection
After successful installation of Solr on your system. Create the first collection in Apache Solr using the following command.
sudo su - solr -c "/opt/solr/bin/solr create -c mycol1-n data_driven_schema_configs"
Created new core 'mycol1'
Step 5 – Access Solr Admin Panel
Default Solr runs on port 8983. You can access Solr port in your web browser and you will get Solr dashboard.
Here you can view statics of created collection in previous steps named “mycol1”. Click on “Core Selector” on the left sidebar and select created collection.
Above images are used from the older version but with the latest version, you will see the same screen.