Solr is pronounced as Solar. It is an enterprise search platform built on Apache Lucene. Similar type of software is Elastic Search. Elasticsearch is on same Apache Lucene and more commonly used with Kibana, Beats, and Logstash as Elastic Stack for searching, analyzing and visualizing data. Here is how to install Apache Solr 6.x on Ubuntu 16.04. Apache Solr search platform can be integrated with WordPress, CMS & other Softwares.
As example, we can integrate Apache Solr for textual search, hit highlighting, boost through function queries
caching, add auto-suggest, arrange custom ranking and add many other features to WordPress search. Obviously Apache Solr can be used for more extensive usage in conjugation with other Big Data tools.
How To Install Apache Solr 6.x on Ubuntu 16.04
SSH to your server, become
root user. Run :
apt update -y
apt upgrade -y
Solr is written in Java application, so Java runtime environment needs to be installed. Also, we have to install Python Software properties. Run the following command to install the components :
apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Hit Return/Enter key to add repository, then run :
apt update -y
We will install the latest version of Oracle Java 8 :
apt install oracle-java8-installer
You will get a TUI prompt to agree to the license to use Oracle Java. After installation, you can verify the version by running :
You will current versions of Apache Solr, as example at this mirror :
Which is big sized
tgz file, that you need to wget :
This command will extract the service installation file :
tar xzf solr-6.6.0.tgz solr-6.6.0/bin/install_solr_service.sh –strip-components=2
Check the files :
This command will install Apache Solr using the extracted script (which we got by running the above command) :
You’ll get output like :
Creating new user: solr
Adding system user `solr' (UID 111) ...
Adding new group `solr' (GID 117) ...
Adding new user `solr' (UID 111) with group `solr' ...
Creating home directory `/var/solr' ...
Run this command. You can read the official documents later to understand why we ran it.
exampletutorial is our chosen named of “collection”, you’ll add own collections later :
sudo su - solr -c "/opt/solr/bin/solr create -c exampletutorial -n data_driven_schema_configs"
You’ll get output :
Copying configuration to new core instance directory:
Creating new core 'exampletutorial' using command:
Apache Solr web interface runs at port 8983 by default. You can visit
http://your.server.ip:8983/solr on browser to view the admin UI.
Follow the Author of this article :