Apache Solr is an open-source search platform developed by the Apache Software Foundation. It is built on Apache Lucene, a widely used text search library in Java. Solr is designed for scalable and efficient search and analytics and is used to build powerful search applications.
- Up and running ubuntu 22.04 LTS machine.
- Basic knowledge in linux commands.
- Internet connectivity.
- 2 Core and 4 GB memory.
In this post, We will show you how to install Apache Solr search engine on ubuntu 22.04 LTS linux machine.
Step 1: Run System Update
To update the package repository information on Ubuntu, you can use the
apt-get command or its newer counterpart,
apt. Here are the steps:
sudo apt-get update
Step 2: Upgrading Packages
To upgrade packages on Ubuntu, you can use the apt or apt-get package management commands. The process involves two steps: updating the package information and upgrading the installed packages.
sudo apt-get upgrade
Step 3: Installing Dependencies
Apache Solr required following package to run, We need to install the followings packages 1st by using given command.
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get install default-jre default-jdk -y
Step 4: Downloading Apache Solr
To download the Apache Solr tar file using the
wget command, you need to know the URL from which the tar file can be obtained.
cd /tmp && sudo wget https://archive.apache.org/dist/lucene/solr/9.4.0/solr-9.4.0.tgz
Step5: Extracting Apache Solr
To extract downloaded Apache Solr tgz file, We need to use the given command.
sudo tar xzf solr-9.4.0.tgz solr-9.4.0/bin/install_solr_service.sh --strip-components=2
Step 6: Installing Apache Solr
We are good to install the Apche Solr on ubuntu machine, We just need to execute the given command.
sudo ./install_solr_service.sh solr-9.4.0.tgz
Step 7: Accessing Admin Interface
By default, Apache Solr typically runs on port
8983 for HTTP access. You can access the Solr admin interface by navigating to the following URL in a web browser:
If you’re running Solr on a different machine, replace “localhost” with the appropriate hostname or IP address.
It’s important to note that the default port might be different if you have configured Solr to run on a different port during installation or in the Solr configuration files. You can check the Solr configuration files, specifically the solr.xml file or the startup scripts, to determine the exact port number.
Keep in mind that for production deployments, it’s common to run Solr behind a web server (e.g., Apache HTTP Server or Nginx) and proxy requests to Solr. In such cases, the port number you use to access Solr may be different based on the web server configuration.
We have successfully installed Apache Solr open source engine on ubuntu 22.04 LTS machine, If you still have questions, please post them in the comments section below.