Skip to content

How to Install Apache Solr on Debian Linux

Steps
8
Category
Web Servers
Covers
Debian
Versions & support
About Debian →
On this page 8 steps

Apache Solr is a popular open-source search platform built on Apache Lucene. It’s widely used for enterprise search and analytics applications. Installing Solr on Debian Linux involves setting up Java, downloading Solr, and configuring it to run as a service.

Installing Apache Solr on Debian Linux is a technical process that involves several steps. Here’s a comprehensive guide on how to accomplish this:

Prerequisites

  • A Debian Linux system
  • Basic knowledge of Linux commands
  • Root or sudo privileges

Step 1 of 8Update the System

Before installing any package, it’s always a good idea to update your system. Open the terminal and run:

sudo apt-get update 
sudo apt-get upgrade 

Step 2 of 8Install Java

Solr requires Java to run. Check if Java is installed by typing:

java -version 

If Java is not installed, install the default JDK with the command:

apt-get install default-jdk 

Step 3 of 8Download Apache Solr

Go to the Apache Solr website to find the latest version. Download it using wget:

wget https://downloads.apache.org/solr/solr-9.4.1/solr-9.4.1.tgz 

Replace 9.4.0 with the latest version number.

Then extract the downloaded tar file using:

tar xzf solr-9.4.1.tgz 

Step 4 of 8Install Solr

Navigate to the Solr installation script directory:

cd solr-9.4.1/bin 

Run the installation script:

sudo ./install_solr_service.sh ../../solr-9.4.1.tgz 

Step 5 of 8Start the Solr Service

Once installed, you can start Solr with the following command:

sudo service solr start 

Step 6 of 8Verify the Installation

Verify that Solr is running by accessing the Solr dashboard in your web browser:

http://your_server_ip:8983/solr

Install Solr on Debian

Step 7 of 8Create a Solr Collection

After successful installation of Solr on your system. You may need to create a collection in Apache Solr using the following command.

sudo su - solr -c "/opt/solr/bin/solr create -c mycol1 -n data_driven_schema_configs" 

Step 8 of 8Configure Solr (Optional)

For production environments, it’s important to configure Solr according to your needs. This can include setting up cores, memory allocation, and security settings.

Conclusion

You have successfully installed Apache Solr on Debian Linux. It’s now ready for you to create search indexes and start integrating it into your applications.

This article provides a basic outline for installing Apache Solr on Debian Linux. For more complex setups or troubleshooting, it’s recommended to consult the official Solr documentation or seek assistance from the Solr community.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top