Skip to main content

In this article I'll walk through the steps I went through to install Solr on Ubuntu.


Step 1: Java

Check if Java is installed on your server:

java -version

Not there - then Java is the first step for you to set up for Solr.  JAVA SE 8 or Later is required to run Apache Solr 8.  Utilisation taking after order to check in the event that you have Java introduced as of now on your system.

sudo apt install openjdk-11-jdk

Version check again and you now will get a response like:

openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)


Step 2: Download & Extract Solr 8.11.2

You can download the latest version of Apache Solr from the official website or use the following command to download the Apache Solr.  I'm not going to use the latest as CKAN at this stage doesn't use v9.  So cross-check with your other installations what version suits.


To download the tar file you will need to add ?action=download as the suffix.  However, doing this action has an impact on the directory naming:

drwxr-xr-x 5 root     root      4096 Aug 15 01:22  omi
-rw-r--r-- 1 root     root 218171227 Jun 13 18:19 'solr-8.11.2.tgz?action=download'

Use the move command to correct the filename

mv 'solr-8.11.2.tgz?action=download' solr-8.11.2.tgz

Now you can extract tar file:

tar xzf solr-8.11.2.tgz solr-8.11.2/bin/ –strip-components=2

Install Solr

./ solr-8.11.2.tgz

This action will create the account with the name of Solr on your system... using port 8983.


Step 3 – Manage Solr Service

Solr is configured as a service on your system. Therefore, use the following commands to Start, Stop and check the status:

sudo systemctl stop solr 
sudo systemctl start solr
sudo systemctl status solr


Step 4 – Create a core

So far so good.  Let's now create a collection in Apache Solr using the following command:

sudo su - solr -c "/opt/solr/bin/solr create -c {collection_name} -n data_driven_schema_configs"

Replacing {collection_name} with the name of the collection you want to generate.  As an example, using a collection name of codenames, the response will be:

Created new core 'codenames'


Step 5 – Access Solr panel

Ok, you have installed and fired up Solr.  Let's now see if you can access it via a browser.  The port to access is 8983.  Using your IP Address or hostname, add :8983 at the end.  Used as




Related articles

Andrew Fletcher23 Aug 2022

flask_debugtoolbar module doesn't exist

Error when running ckan.ini init from flask_debugtoolbar import DebugToolbarExtension ModuleNotFoundError: No module named 'flask_debugtoolbar' Activate your CKAN virtual environment, for example: . /usr/lib/ckan/default/bin/activate Then check your location is cd...
Andrew Fletcher17 Aug 2022

How To Install Apache Solr 8.11 on CentOS/RHEL 7

Looking to install Solr on your server?  Not sure if it worth the effort?  Well, Apache Solr is the open-source, popular, super fast open source enterprise search platform from the Apache Lucene project.  Written in Java, Solr is highly scalable, providing fault-tolerant distributed...