How to Install Apache Solr on Elementary OS Latest

Apache Solr is an open-source search platform that helps to search and index a large amount of data from different sources. In this tutorial, we will learn how to install Apache Solr on Elementary OS Latest version.

Prerequisites

Step 1: Install Java

Java is a crucial component required to run Apache Solr platform. Follow the below steps to install Java:

  1. Open the terminal by pressing Ctrl + Alt + T or open it from the application menu.

  2. Run the following command to update the package list:

    sudo apt update
    
  3. Once the update process is completed, type the following command to install the default JDK package:

    sudo apt install default-jdk
    
  4. After the installation, verify the version of Java by running the following command:

    java -version
    

    It will return the version of Java installed on your system.

Step 2: Download Apache Solr

To download the latest version of Apache Solr, follow these steps:

  1. Open any web browser and navigate to the following official Apache Solr download page:

    https://lucene.apache.org/solr/downloads.html

  2. Click on the latest version of Solr (e.g., Solr 8.10.0) from under "Latest Release" to download.

  3. Extract the downloaded file and put it in /opt directory

    sudo tar -xzf solr-8.10.0.tgz -C /opt/
    
  4. Rename the extracted solr directory to solr using the following command:

    sudo mv /opt/solr-8.10.0 /opt/solr
    

Step 3: Start Apache Solr

To start Apache Solr, follow these steps:

  1. Change the directory to the solr directory:

    cd /opt/solr/bin
    
  2. Start the Solr server using the solr command:

    sudo ./solr start
    
  3. Verify that the server is running by going to your web browser and accessing the following URL:

    http://localhost:8983/solr/

    If the server is running successfully, you will see the Apache Solr homepage.

Conclusion

In this tutorial, we have learned how to install Apache Solr on Elementary OS Latest version. We installed Java, downloaded and extracted Apache Solr, and started the Solr server. You can now use Apache Solr to search and index your data.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!