How to Install Elasticsearch on a Linux Machine (Red Hat Family): A Step-by-Step Guide for Beginners


If you’re familiar with Red Hat-based Linux distributions, such as CentOS, Fedora, or Red Hat Enterprise Linux, you may know that package installation can differ from Debian-based distributions. In this guide, I’ll walk you through installing Elasticsearch on a Red Hat family Linux distribution.


Ensure you’re running a Red Hat-based machine with at least 1 GB of RAM and 10 GB of free storage. An internet connection is also essential to fetch required packages.

1. Update Your Linux Machine

It’s always a good starting point to update your system:


sudo yum update

2. Install Java

Elasticsearch needs Java to operate:


sudo yum install java-11-openjdk-devel

After the installation, you can check the Java version:


java -version

3. Download and Install Elasticsearch

Elastic provides an RPM repository for their software installation on Red Hat family:


sudo rpm --import

Then, create a file named elasticsearch.repo under /etc/yum.repos.d/:


sudo nano /etc/yum.repos.d/elasticsearch.repo

And input the following lines:


[elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl= gpgcheck=1 gpgkey= enabled=1 autorefresh=1 type=rpm-md

You can then install Elasticsearch:


sudo yum install elasticsearch

4. Configure Elasticsearch

Open Elasticsearch’s configuration file:


sudo nano /etc/elasticsearch/elasticsearch.yml

Adjust or add the following lines:

yaml http.port: 9200

Save and close the file.

5. Start Elasticsearch

Kick-start Elasticsearch using:


sudo systemctl start elasticsearch

And to make it boot at startup:


sudo systemctl enable elasticsearch

6. Test the Installation

To ensure Elasticsearch is up and running:


curl -X GET "localhost:9200/"

If you receive a response detailing Elasticsearch’s version, you’re all set!


You’ve successfully installed Elasticsearch on a Red Hat family Linux distribution! As always, refer to the official documentation for advanced settings and updates.

Redazione UPFD

Redazione UPFD

About Author

Leave a comment

Your email address will not be published. Required fields are marked *

You may also like

Education Fashion Health Technology

40 Photos Proving Blonde is Ombré Dye Going

Blonde ombré is the reigning hair trend. Through 40 photos, we explore the allure and versatility of this iconic blend.
Tech Technology

How to Install Elasticsearch on a Linux Machine (Debian-based): A Step-by-Step Guide for Beginners

This beginner-friendly guide offers step-by-step instructions to install Elasticsearch on Debian-based Linux systems. After updating the system and setting up