Atlantic.Net Blog

How to Install Apache Solr on Oracle Linux 8

Hitesh Jethva
by Atlantic.Net (414 posts) under Tutorials, VPS Hosting
0 Comments

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.

Prerequisites

  • 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:

java --version

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:

wget https://dlcdn.apache.org/lucene/solr/8.11.1/solr-8.11.1.tgz

Once Apache Solr is downloaded, download the SHA512 checksum using the following command:

wget https://downloads.apache.org/lucene/solr/8.11.1/solr-8.11.1.tgz.sha512

Next, calculate the SHA512 checksum of the Apache Solr downloaded file:

gpg --print-md SHA512 solr-8.11.1.tgz

Sample output:

solr-8.11.1.tgz: 4893F836 AEC84B03 D7BFE574 E59E305C 03B5EDE4 A4802003 4FBE8144
                 0B8FEEE7 9E55FD9E AD230E5B 89B3F251 24E9B56C 1DDC4BB5 C7F631CF
                 4E846B9C AB5F9A45

Next, compare the hash value to the contents of the SHA512 file:

cat solr-8.11.1.tgz.sha512

Sample output:

4893f836aec84b03d7bfe574e59e305c03b5ede4a48020034fbe81440b8feee79e55fd9ead230e5b89b3f25124e9b56c1ddc4bb5c7f631cf4e846b9cab5f9a45 *solr-8.11.1.tgz

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:

solr-8.11.1/bin/install_solr_service.sh solr-8.11.1.tgz

Once the installation is complete, you should get the following output:

Solr process 4739 running on port 8983
{
  "solr_home":"/var/solr/data",
  "version":"8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:55",
  "startTime":"2022-04-30T12:07:29.806Z",
  "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

Sample output:

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:

firewall-cmd --reload

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:

Apache Solr dashboard page

Conclusion

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!

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Top 10 Best Cybersecurity Training Services
How to Install Ansible on Oracle Linux 8
How to Install LEMP Server on Oracle Linux 8
How to Install and Configure Apache Webserver on Oracle Linux 8
How to Install and Configure Nginx Webserver on Oracle Linux 8

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Dallas, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources