How To Install Apache Solr 6.2 on Ubuntu, Debian & LinuxMint

Apache Solr is an opensource search platform written on 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 on Ubuntu, Debian and Linuxmint.

Step 1 — Verify Java

Apache Solr 6 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_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode) 
If you don’t have java installed, Use this tutorial to install Java.

Step 2 — Install Apache Solr

Now download the required solr version from its official site or mirrors. Or simply use following command to download Apache Solr 6.2.0.
$ cd /opt $ wget http://apache.mirror1.spango.com/lucene/solr/6.2.0/solr-6.2.0.tgz 
Now extract solr service installer shell script from the downloaded Solr archive file and run installer using following commands.
$ tar xzf solr-6.2.0.tgz solr-6.2.0/bin/install_solr_service.sh --strip-components=2 $ sudo bash ./install_solr_service.sh solr-6.2.0.tgz 

Step 3 — Start / Stop Solr Service

Use the following commands to Start, Stop and check status of Solr service.
$ sudo service solr stop $ sudo service solr start $ sudo service solr status 

Step 4- Create First Solr Collection

After successful installation of Solr on your system. Create first collection on solr using following command.
$ sudo su - solr -c "/opt/solr/bin/solr create -c mycollection1 -n data_driven_schema_configs" 
Sample output:
 Copying configuration to new core instance directory: /var/solr/data/mycollection1  Creating new core 'mycollection1' using command: http://localhost:8983/solr/admin/cores?action=CREATE&name=mycollection1&instanceDir=mycollection1  {   "responseHeader":{     "status":0,     "QTime":15292},   "core":"mycollection1"}  

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.
  http://svr1.tecadmin.net:8983/ 
Solr-admin-panel
Here you can view statics of created collection in previous steps named “mycollection1”. Click on “Core Selector” on left sidebar and select created collection.
Solr-select-core-collection

Thanks for Visit Here

Comments