Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»Ubuntu»How to Install Apache Solr 9.0 on Ubuntu 22.04

    How to Install Apache Solr 9.0 on Ubuntu 22.04

    By RahulAugust 18, 20223 Mins Read

    Apache Solr is an open-source search platform written on Java. Solr provides full-text search, spell suggestions, custom document ordering and ranking, Snippet generation, and highlighting.

    Advertisement

    This tutorial will help you to install Apache Solr 9.0 on Ubuntu 22.04 Jammy Jellyfish systems.

    Step 1 – Install Java

    Apache Solr 9 required Java 11 or greater version to run. It is also tested with Java 17. Make sure that your system satisfied all requirements of Apache Solr. If in case, java is not installed on your system run the following command:

    sudo apt update && sudo apt install default-jdk 
    

    After installation, check the active Java version:

    java -version 
    
    openjdk version "11.0.15" 2022-04-19
    OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)
    OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
    
    Visit the below link to install other Java versions on Ubuntu 22.04.
    https://tecadmin.net/how-to-install-java-on-ubuntu-22-04/

    Step 2 – Installing Apache Solr on Ubuntu

    At the time of writing this tutorial, Apache Solr 9.0 is the latest available version. That can be downloaded with the following command. In case the download failed, visit the Solr download page to get the latest version.

    To download Apache Solr 9.0, type:

    wget https://dlcdn.apache.org/solr/solr/9.0.0/solr-9.0.0.tgz 
    

    After downloading, extract the Apache Solr service installer shell script from the Solr archive file.

    tar xzf solr-9.0.0.tgz solr-9.0.0/bin/install_solr_service.sh --strip-components=2 
    

    Then, start the Solar installation on Ubuntu by executing the following command. Make sure to run the command from the same directory of the downloaded archive file.

    sudo bash ./install_solr_service.sh solr-9.0.0.tgz 
    
    Installing Apache Solr on Ubuntu 22.04
    Installing Apache Solr on Ubuntu

    This will complete the Apache Solr installation on your Ubuntu system.

    Step 3 – Manage Solr Service

    Solr is configured as a service on your system. You can simply use the following commands to Start, Stop and check the status of the Solr service.

    • Start Solr service:
      sudo systemctl stop solr 
      
    • Stop Solr service:
      sudo systemctl start solr 
      
    • Check the status of Solr service:
      sudo systemctl status solr 
      

    Step 4 – Create A New Solr Collection

    After the successful installation of Solr on your system. Create the first collection in Apache Solr using the following command.

    sudo su - solr -c "/opt/solr/bin/solr create -c mycol1 -n data_driven_schema_configs" 
    
    Ouput:
    Created new core 'mycol1'

    Step 5 – Allow Apache Solr Public Access

    The default Apache Solr runs on localhost only. To allow the Solr server publically accessible over networks, edit the /etc/default/solr.in.sh configuration file.

    sudo vim /etc/default/solr.in.sh 
    

    Search for the SOLR_JETTY_HOST variable. Uncomment it by removing the starting hash (#) symbol. Set the value to “0.0.0.0”.

    Installing Apache Solr on Ubuntu 22.04
    Change Apache Solr Listen Host Address

    Save the file and close it. Restart the Solr service to apply changes.

    sudo systemctl restart solr 
    

    Check the Apache Solr listening host address.

    sudo ss -tupln  | grep 8983 
    
    Installing Apache Solr on Ubuntu 22.04
    Check Apache Solar Listening Host and Port

    As per the above screenshot, the Solr is listening on all (“*”) interfaces.

    Step 6 – Access Solr Admin Panel

    The default Apache Solr runs on port 8983. You can access the Solr port in your web browser using the server IP address or domain name pointed to that server.

  • http://solr.tecadmin.net:8983/
  • Installing Apache Solr on Ubuntu 22.04
    Apache Solr Dashboard

    Now, select “mycol1” under core selector drop down in the left sidebar

    Installing Apache Solr on Ubuntu 22.04
    Apache Solr Collection Dashboard

    Here you can view statics of created collection in previous steps named “mycol1”. Click on “Core Selector” on the left sidebar and select created collection.

    Conclusion

    In this tutorial, you have learned about the installation of the Apache Solr service on the Ubuntu 22.04 Linux system.

    apache solr Solr Ubuntu 22.04
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Setup DKIM (DomainKeys) with Postfix

    A Step-by-Step Guide to Installing OpenDKIM with Postfix on Ubuntu – Unleash the Power of DKIM!

    How to Install Composer on Ubuntu 22.04

    How to Install Composer on Ubuntu 22.04

    Setting Up SFTP User in Ubuntu 22.04

    How to Create SFTP User in Ubuntu 22.04 (No Shell Access)

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.