In this tutorial, we will show you how to install Apache Solr on Debian 11. For those of you who didn’t know, Apache Solr is an open-source enterprise search platform, written in Java. Apache Solr is widely used for enterprise search and analytics use cases and has an active development community and regular releases.
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 and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the Apache Solr on a Debian 11 (Bullseye).
Install Apache Solr on Debian 11 Bullseye
Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following
apt commands in the terminal:
sudo apt update sudo apt upgrade sudo apt install default-jre gnupg2 apt-transport-https wget
Step 2. Installing Java.
Run the following command to install Java to your Debian system:
sudo apt install default-jre default-jdk
You can verify the installation of Java by running the command below:
Step 3. Installing Apache Solr on Debian 11.
Now we download the latest version of Apache Solr from the official page:
Next, extract the downloaded file with the following command below:
tar xzf solr-8.9.0.tgz
To install Apache Solr on your Debian system, you will have to execute the following terminal command:
bash solr-8.9.0/bin/install_solr_service.sh solr-8.9.0.tgz
After installed, you can simply use the following commands to start, stop, restart, and check the status of the Solr service:
sudo systemctl start solr sudo systemctl stop solr sudo systemctl status solr
Step 4. Create Apache Solr Collection.
Now we create the first collection in Apache Solr using the following command below:
su - solr -c "/opt/solr/bin/solr create -c idrootwell -n data_driven_schema_configs"
Created new core 'idrootwell'
Step 5. Accessing Apache Solr Web Interface.
Once successfully installed, now access the Apache Solr web interface using the URL
http://your-server-ip-address:8983. You should see the Apache Solr dashboard on the following screen:
Congratulations! You have successfully installed Solr. Thanks for using this tutorial for installing the latest version of the Apache Solr on Debian 11 Bullseye. For additional help or useful information, we recommend you check the official Apache Solr website.