Share icon

Install Apache Solr 7.7 on Ubuntu 18.04 & 16.04 LTS

This tutorials explains how to install solr 7 on ubuntu system

1) Install or Check Java

Apache solr 7 required java to run there application on the server. Verify java is installed or not on server first using command:

java -version

Result :

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

If you able to see above result, then you are ready to Install Apache Solr. Else use this tutorial

2) Download and Install Apache solr

To Download solr from original site follow the steps of commands below:

cd /opt

wget http://apachemirror.wuchna.com/lucene/solr/7.7.2/solr-7.7.2.tgz 

tar xzf solr-7.7.2.tgz solr-7.7.2/bin/install_solr_service.sh --strip-components=2

sudo bash ./install_solr_service.sh solr-7.7.2.tgz

You also get More info form offical site, Or you can choose any of the version(Binary releases) of Solr to Install.

3) verify Install Apache Solr

To verify the installation to need to run command

sudo service solr status

Result:

solr.service - LSB: Controls Apache Solr as a Service
   Loaded: loaded (/etc/init.d/solr; generated)
   Active: active (exited) since Tue 2019-09-03 14:28:28 UTC; 17h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14862 ExecStop=/etc/init.d/solr stop (code=exited, status=0/SUCCESS)
  Process: 15040 ExecStart=/etc/init.d/solr start (code=exited, status=0/SUCCESS

That means you Install Solr sucessfully.

some commands for future use:

sudo service solr stop
sudo service solr start

 

Now solr admin panel is also visiable to you, open in browser http://server-ip-address:8983/solr.

4) Create New Core for Indexing-

You can create that form admin panel or by command also but you have to put instance Directory and data directory manually to get in work.

command:

sudo su - solr -c "/opt/solr/bin/solr create -c core1 -n data_driven_schema_configs"

manually:

Open Solr admin panel >> Core Admin >> Add Core

 

Now copy required Files on place:

cd /var/solr/core1

mkdir data

cp -a /opt/solr/server/solr/configsets/_default/conf  /var/solr/core1/

service solr restart

Refresh admin panel, you able to see the new core on admin panel.

Note-

1) WHEN YOU CREATE THE CORE FORM ADMIN PANEL, IT WILL SHOWS ERROR , AFTER FILES ARE PLACE ERROR GONE.

2) MAKE SURE YOU HAVE PROPER PERMISSION ON /VAR/SOLR FOLDER, ELSE DO THIS:

chown -R solr:solr /var/solr

Do this to resolve access denied error. If you have still some errors please comment below

Thanks.


Please Comment your thoughts and feedback below and add something if you found good in anywhere to help others

Hit a like Button If you like the Post.

Many Thanks

Add new comment

Restricted HTML