Sunday, 17 July 2016

INSTALLATION OF SOLR-6.1.0 IN UBUNTU 15.10 LTS

Hello friends I have just install Solr-6.1.0 in my system and here I 
am here to tell you how to install Solr- 6.1.0 in ubuntu 15.10 LTS. 

There are few steps that you need to be done, and Solr will be running in your system.

Brief about Solr


  • It is open source enterprise “search” platform like google, Bing.

  • It's framework, core derived from “Apache Lucene”

  • Mainly used to impove searching capabilty

  • It's core is written in java, but API's are available in many other languages

  • Solr is the second-most popular enterprise search engine after “Elasticsearch”

  • You put documents in it(called “indexing”) via XML, JSON,CSV or binary over HTTP

  •  You query it via HTTP GET and get XML,JSON,CSV,or binary results.


How to Install Solr-6.1.0 in ubuntu 15.10



Please follow the steps to install Solr Open terminal in your system 

and type these commands


step 1:


sudo apt-get install python-software-properties



Step 2:


apt-get install software-properties-common



Step 3:


sudo apt-get update



Step 4:


sudo apt-get install oracle-java8-installer



Check java version:



java -version



Step 5:



cd /tmp or another directory you want to locate Solr



Step 6:


Please check that file exist in that site or not by visiting 






wget http://www.us.apache.org/dist/lucene/solr/6.1.0/solr-6.1.0.tgz



Check Solr downloaded filed in the directory type


ls



Output:


solr-6.1.0.tgz




Step 7:



Now, run the given below command to extract the service 

installation file:



tar xzf solr-6.1.0.tgz solr-6.1.0/bin/install_solr_service.sh –strip-

components=2


ls


Outout:


install_solr_service.sh



Step 8:


sudo ./install_solr_service.sh solr-6.1.0.tgz



Output:


./install_solr_service.sh solr-6.1.0.tgz
id: solr: no such user
Creating new user: solr
Adding system user `solr' (UID 123) ...
Adding new group `solr' (GID 132) ...
Adding new user `solr' (UID 123) with group `solr' ...
Creating home directory `/var/solr' ...

Extracting solr-6.1.0.tgz to /opt


Installing symlink /opt/solr -> /opt/solr-6.1.0 ...


Installing /etc/init.d/solr script ...


Installing /etc/default/solr.in.sh ...

● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr)
Active: active (exited) since Sun 2016-07-17 19:35:16 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 8038 ExecStart=/etc/init.d/solr start (code=exited, status=0/SUCCESS)

Jul 17 19:35:10 tarun-HP-EliteBook-8460p systemd[1]: Starting LSB: Controls Apache Solr as a Service...
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: Successful su for solr by root
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: + ??? root:solr
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: pam_unix(su:session): session opened for user solr by (uid=0)
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: [169B blob data]
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: Started Solr server on port 8983 (pid=8098). Happy searching!
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: [14B blob data]
Jul 17 19:35:16 tarun-HP-EliteBook-8460p systemd[1]: Started LSB: Controls Apache Solr as a Service.
Service solr installed.


Step 9:


sudo service solr status



Output


service solr status
● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr)
Active: active (exited) since Sun 2016-07-17 19:35:16 IST; 19min ago
Docs: man:systemd-sysv-generator(8)
Process: 8038 ExecStart=/etc/init.d/solr start (code=exited, status=0/SUCCESS)

Jul 17 19:35:10 tarun-HP-EliteBook-8460p systemd[1]: Starting LSB: Controls Apache Solr as a Service...
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: Successful su for solr by root
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: + ??? root:solr
Jul 17 19:35:10 tarun-HP-EliteBook-8460p su[8040]: pam_unix(su:session): session opened for user solr by (uid=0)
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: [169B blob data]
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: Started Solr server on port 8983 (pid=8098). Happy searching!
Jul 17 19:35:16 tarun-HP-EliteBook-8460p solr[8038]: [14B blob data]
Jul 17 19:35:16 tarun-HP-EliteBook-8460p systemd[1]: Started LSB: Controls Apache Solr as a Service.


Yea, Solr has installed in your system and is running on port 8983.


You can open it in the browser as

http://localhost:8983/solr


You can insert documents in it and query to retrieve the 

results.enjoy :)


If you want to install for another version then please follow these 

links:



OR



OR

Important Links: Download Solr :



OR

http://mirror.fibergrid.in/apache/lucene/solr/6.1.0


Learn more about solr in their official site:


No comments:

Post a Comment