Your cart is currently empty!
How to Install Apache Solr on Ubuntu
Apache Solr is a powerful open-source search platform used by some of the world’s largest websites and applications. If you need fast, reliable search on your own site or app, Solr is a solid choice. Here’s how you can install Solr on an Ubuntu server.
Prerequisites
Before you start, make sure you have:
- An Ubuntu server (tested with Ubuntu 20.04+)
- A non-root user with
sudo
privileges - Java 8 or higher installed
Step 1: Update Your System
First, update your package lists:
sudo apt update
sudo apt upgrade -y
Step 2: Install Java
Solr runs on Java, so you need to have it installed. You can check if Java is installed with:
java -version
If it’s not installed, add it with:
sudo apt install default-jdk -y
Step 3: Download Apache Solr
Go to Solr’s download page and grab the latest version link. You can use wget
to download:
wget https://downloads.apache.org/lucene/solr/9.6.0/solr-9.6.0.tgz
(Replace the URL with the latest version if needed.)
Step 4: Extract and Install Solr
Unpack the archive and use the install script provided:
tar xzf solr-9.6.0.tgz
cd solr-9.6.0
sudo bash bin/install_solr_service.sh ../solr-9.6.0.tgz
Solr will be installed as a service that starts automatically.
Step 5: Check Solr Status
To make sure everything worked, run:
sudo systemctl status solr
You should see that Solr is running.
Step 6: Access Solr Admin UI
By default, Solr listens on port 8983. Open your browser and go to:
http://your_server_ip:8983/solr
You should see the Solr admin dashboard.
Step 7: Secure Solr (Optional, but Important)
Solr’s admin UI is open to the world by default. To keep things secure, consider:
- Using a firewall (UFW) to restrict access to port 8983.
- Setting up Solr authentication (see Solr’s security documentation).
Final Thoughts
That’s it—you now have Solr running on Ubuntu. You’re ready to start creating cores, indexing data, and building search features. For advanced settings and production tips, check out the official Solr documentation.
If you run into issues, drop a comment below and I’ll try to help.
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!