Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    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

    RahulBy RahulMay 25, 20223 Mins ReadUpdated:May 26, 2022

    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.

    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 downlaod 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 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 Ubuntu 22.04 Linux system.

    apache solr Solr Ubuntu 22.04
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install MariaDB on Ubuntu 22.04
    Next Article How to Install Apache Maven on Ubuntu 22.04

    Related Posts

    How to Install Composer on Ubuntu 22.04

    Updated:June 24, 20223 Mins Read

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

    Updated:June 14, 20224 Mins Read

    How To Install Anaconda on Ubuntu 22.04

    4 Mins Read

    How to Install Apache Kafka on Ubuntu 22.04

    Updated:June 5, 20225 Mins Read

    Configuring Apache Solr to Accessible on Public IP

    2 Mins Read

    How To Install XRDP on Ubuntu 22.04

    3 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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