Introduction
Elasticsearch is a highly scalable open-source search and analytics engine that enables users to store, search, and analyze large amounts of data quickly and in near real-time. It's commonly used in a variety of applications, including web search, log analysis, and data exploration.
This article will explain how to install Elasticsearch on Fedora 34 and Fedora 35.
Prerequisites
- A root or non-root user with
sudo
privileges.
Install Java
- Before we start the installation, updating the system to ensure that all packages are up-to-date is a good idea.
# sudo dnf -y update
- Elasticsearch requires Java to run, so the next step is to install the latest version of Java. Run the following command to install the OpenJDK 11 package.
# sudo dnf -y install java-11-openjdk-devel
- Verify the installed java version.
# java -version
Install Elasticsearch
- We will be installing Elasticsearch with the rpm after importing the GPG key.
# sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
# sudo dnf -y install https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.3-x86_64.rpm - To start the Elasticsearch service and enable it to start automatically at boot time, run the following commands.
# sudo systemctl start elasticsearch.service
# sudo systemctl enable elasticsearch.service - To verify that Elasticsearch is running correctly, run the following command.
curl -X GET "localhost:9200/"
If Elasticsearch is running correctly, you should see an output similar to the following.