Apache Solr is an open-source, highly scalable, reliable, and fault-tolerant search tool based on Java. It supports NoSQL and database queries through REST APIs such as Elasticsearch. In addition, it stores data and provides distributed indexing, replication, automated fail-over and recovery, and load-balanced querying to achieve data querying in near real-time. In this article, you will learn how to install Apache Solr on Ubuntu 20.04 Server.
$ sudo apt install default-jdk -y
Verify the Java installation.
$ java -version
To download the latest version of Apache Solr, go to the Apache official download website.
Download Apache Solr.
$ sudo wget https://archive.apache.org/dist/lucene/solr/8.9.0/solr-8.9.0.tgz
Extract the downloaded archives.
$ sudo tar xzf solr-8.9.0.tgz
Install Apache Solr.
$ sudo bash solr-8.9.0/bin/install_solr_service.sh solr-8.9.0.tgz
Check the status of the Apache Solr service.
$ sudo systemctl status solr
Enable the Apache Solr service to start on system boot.
$ sudo systemctl enable solr
8983 through the UFW firewall.
$ sudo ufw allow 8983
To access the Apache Solr web interface, go to your browser and enter
http://serverIP:8983. For example:
You have successfully installed Apache Solr. You can now begin creating new Solr collections via the web dashboard.
Collection is a logical index spread across multiple servers.
Core is that part of the server which runs one collection.
For more information on Apache Solr, please see the official documentation.