How To Install Apache Solr on Ubuntu 14.04

Install Apache Solr on Ubuntu 14.04

In this tutorial, we will show you how to install and configuration of Apache Solr on Ubuntu 14.04 LTS.  For those of you who didn’t know, Apache Solr is an open-source search platform written on Java. It is based on Apache Lucene and is written in Java. Just like Elasticsearch, it supports database queries through REST APIs. Solr aims at providing distributed indexing, replication, and load-balanced querying with automated failover and recovery.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of Apache Solr in Ubuntu 14.04.


  • A server running one of the following operating systems: Ubuntu 14.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Apache Solr on Ubuntu 14.04

Step 1. First, install Java.

Because tomcat and Solr are Java-based software we need the Java environment (As it is advised in the Solr wiki: prefer a full JDK to a simple JRE.)

Add the webupd8team Java PPA repository to your system:

sudo add-apt-repository -y ppa:webupd8team/java

After adding the PPA, run the commands below one by one to install Java:

sudo apt-get update
sudo aptitude -y install oracle-java8-installer

Verify the installed Java version:

#java -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Step 2. Install Apache Solr on Ubuntu 14.04.

Ubuntu provides 3 Solr packages by default: Solr-commo, the package that contains the actual Solr code; Solr-tomcat, Solr integrated with Tomcat; and Solr-jetty, which is just like Solr-tomcat but with the Jetty web server. In this article, we will install Solr-tomcat, so execute the following command:

sudo apt-get -y install solr-tomcat

Then let’s start the server:

sudo service tomcat6 start

Important: the config & index will be stored at : /usr/share/solr/

Step 3. Install tomcat management utilities.

sudo apt-get install tomcat6-admin

Once installed, you’ll have to grant some users:

sudo nano /etc/tomcat6/tomcat-users.xml

Paste these lines (change username and password as you wish):

<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="manager,admin"/>

Step 4. Accessing Apache Solr.

Apache Solr will be available on HTTP port 8080 by default. Open your favorite browser and navigate to  or http://your-server-ip:8080/solr. If you are using a firewall, please open port 8080 to enable access to the control panel.

Install Apache Solr on Ubuntu 14.04

Congratulations! You have successfully installed Apache Solr. Thanks for using this tutorial for installing Apache Solr on Ubuntu 14.04 system. For additional help or useful information, we recommend you check the official Apache Solr website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button