Big Data 4 min read

Step-by-Step Guide to Installing and Configuring Elasticsearch 7.6.2 on CentOS 7

This article provides a complete tutorial for installing Java, downloading Elasticsearch 7.6.2, configuring elasticsearch.yml, starting the service, setting up user passwords, and verifying the single‑node deployment on a CentOS 7 server, complete with command examples and screenshots.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Step-by-Step Guide to Installing and Configuring Elasticsearch 7.6.2 on CentOS 7

Elasticsearch is a Lucene‑based search server that offers a distributed, multi‑user full‑text search engine via a RESTful web interface. Developed in Java and released under the Apache license, it is widely used in cloud computing environments for real‑time, stable, reliable, and fast search capabilities.

1. Install the Java runtime (JDK 1.8) on the CentOS 7 host:

yum install java-1.8.0 -y

2. Download and install Elasticsearch 7.6.2 using the RPM package:

3. Edit the elasticsearch.yml configuration file (usually located at /etc/elasticsearch/elasticsearch.yml ) with the following settings:

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
xpack.security.enabled: true
discovery.type: single-node

4. Start the Elasticsearch service:

systemctl start elasticsearch

5. Set passwords for the built‑in users (elastic, apm_system, kibana, etc.) using the interactive setup tool:

/usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive

The tool prompts for passwords for each user and confirms the changes, e.g.,

Enter password for [elastic]:
Reenter password for [elastic]:

After confirming, passwords for all reserved users are updated.

6. Verify that Elasticsearch is running and secured by issuing a curl request with the newly set credentials:

curl -u elastic:hahashen http://192.168.20.41:9200

The response returns cluster information in JSON format, confirming the version (7.6.2) and other details.

7. The single‑node Elasticsearch deployment is now complete; users can scan the QR code below to follow the project for further learning.

Search EngineElasticsearchconfigurationInstallationCentOS7
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.