Install elastisearch on CentOS 8

Insight: Tutorial To Install Elasticsearch on CentOS 8

Elasticsearch, developed in Java is a search engine based on the Lucene library that provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.

In this tutorial post, we will show you the method to install Elastisearch on CentOS 8 Linux operating system.

Tutorial To Install Elasticsearch on CentOS 8

Run the following as root to install the OpenJDK package at first:

sudo dnf install java-11-openjdk-devel

As elasticsearch is not available in the standard CentOS 8 repositories, you need to install it from the Elasticsearch RPM repository.


sudo rpm --import

Now, Open your text editor and create the repository file the /etc/yum.repos.d/ directory:

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

Paste the following content:

name=Elasticsearch repository for 7.x packages
Save the file and close your text editor.

Now that the repository is enabled. You can easily install the Elasticsearch by typing the following command:

sudo dnf install elasticsearch

Now start, and enable the service:

sudo systemctl enable elasticsearch.service --now

If you want to verify that Elasticsearch is running or not, you can run the command by using curl to send an HTTP request to port 9200 on localhost:

curl -X GET "localhost:9200/"
READ More Relevant Stuff:  Fix Linux and Windows Showing Different Times [Dual Booting]

Leave a Reply

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