Apache Solr is an open-source, REST API-based search platform built on Apache Lucene Framework. It is also called “Searching On Lucene w/Replication.” Written in Java Language, Apache Solr is designed for scalability and fault tolerance. Solr is enterprise-ready, fast, and highly scalable, making it ideal for use in search-based and big data analytics applications. In simple terms, Solr is a ready-to-deploy search engine that is optimized to search large volumes of text-centric data.
In this post, we will show you how to install Apache Solr on Oracle Linux 8.
- A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform
- A root password configured on your server
Step 1 – Create Atlantic.Net Cloud Server
First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.
Once you are logged in to your server, run the following command to update your base system with the latest available packages.
dnf update -y
Step 2 – Install Java JDK
Apache Solr is written in Java, so Java must be installed on your server. If not installed, you can install it with the following command:
dnf install java-11-openjdk -y
Once installed, you can verify the Java version using the following command:
You should get the following output:
openjdk 11.0.15 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
You will also need to install the EPEL repository on your server. You can install it with the following command:
dnf install epel-release -y
Step 3 – Download Apache Solr
By default, Apache Solr is not included in the Oracle Linux default repository, so you will need to download it from their official website.
You can download it with the following command:
Once Apache Solr is downloaded, download the SHA512 checksum using the following command:
Next, calculate the SHA512 checksum of the Apache Solr downloaded file:
gpg --print-md SHA512 solr-8.11.1.tgz
solr-8.11.1.tgz: 4893F836 AEC84B03 D7BFE574 E59E305C 03B5EDE4 A4802003 4FBE8144
0B8FEEE7 9E55FD9E AD230E5B 89B3F251 24E9B56C 1DDC4BB5 C7F631CF
Next, compare the hash value to the contents of the SHA512 file:
After matching the SHA512 hashes, extract the downloaded file with the following command:
tar xzf solr-8.11.1.tgz
Step 4 – Install Apache Solr
At this point, Apache Solr is downloaded and ready for installation. You can install it using the following command:
Once the installation is complete, you should get the following output:
Solr process 4739 running on port 8983
"version":"8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:55",
"uptime":"0 days, 0 hours, 0 minutes, 13 seconds",
"memory":"91.9 MB (%17.9) of 512 MB"}
At this point, Apache Solr is started and listens on port 8983. You can check it with the following command:
ss -altnp | grep 8983
LISTEN 0 50 *:8983 *:* users:(("java",pid=4739,fd=157))
Step 5 – Configure Firewall
If the firewalld firewall is installed and running in your server, then you will need to allow port 8983 through firewalld. You can allow it with the following command:
firewall-cmd --add-port=8983/tcp --permanent
Next, reload the firewall using the following command:
Step 6 – Access Apache Solr
You can now open your web browser and access the Apache Solr web interface using the URL http://your-server-ip:8983. You should see the Apache Solr dashboard on the following page:
Congratulations! You have successfully installed Apache Solr on Oracle Linux 8. You can now start building a search-based big analytics application using the Apache Solr. Give it a try on your virtual private server from Atlantic.Net!