Operations 4 min read

Step-by-Step Installation and Configuration of Elasticsearch, Logstash, and Kibana on CentOS 7

This guide details the prerequisites, RPM-based installation, configuration files, and startup procedures for Elasticsearch, Logstash, and Kibana on a CentOS 7 virtual machine, including verification steps to confirm each component is running correctly.

DevOps Cloud Academy
DevOps Cloud Academy
DevOps Cloud Academy
Step-by-Step Installation and Configuration of Elasticsearch, Logstash, and Kibana on CentOS 7

1. Preparation

Reference: https://www.cnblogs.com/straycats/p/8053937.html . The environment requires a CentOS 7 virtual machine with 8 GB RAM and JDK 8+, and the Elastic packages are downloaded as RPMs from the official Elastic website.

2. Install Elasticsearch

Execute the following RPM command to install Elasticsearch 6.4.2 and then locate the default directories and configuration file.

rpm -ivh elasticsearch-6.4.2.rpm
rpm -ql elasticsearch  # default /usr/share/elasticsearch
# default log directory /var/log/elasticsearch
/etc/elasticsearch/elasticsearch.yml  # configuration file
path.data  # data directory
path.logs   # log directory
network.host  # bind address
http.port   # port

Start and enable the service, then verify it is listening on port 9200.

systemctl start elasticsearch
systemctl enable elasticsearch
netstat -anlpt | grep 9200
curl http://127.0.0.1:9200

The JSON response from the curl command confirms that Elasticsearch has started successfully.

3. Install Logstash

Install Logstash 6.4.2 using the RPM package and configure its main YAML file.

rpm -ivh logstash-6.4.2.rpm
/etc/logstash/logstash.yaml  # configuration file
path.data
path.config
path.logs
# start (may be slow)
systemctl start logstash
systemctl enable logstash

Create a symbolic link for easier command‑line access.

ln -s /usr/share/logstash/bin/logstash /bin/

After starting the service, verify its operation; the following screenshot shows a successful launch.

Successful startup is confirmed by the displayed output.

4. Install Kibana

Install Kibana 6.4.2 via RPM and edit the kibana.yml file to set the server and Elasticsearch connection parameters.

rpm -ivh kibana-6.4.2-x86_64.rpm
/etc/kibana/kibana.yml  # configuration file
server.port
server.host
elasticsearch.url
kibana.index

Start and enable Kibana, then check that it is listening on port 5601.

systemctl start kibana
systemctl enable kibana
netstat -anlpt | grep 5601
http://192.168.0.15:5601

Accessing the URL in a browser displays the Kibana dashboard, confirming a successful installation.

operationsElasticsearchInstallationElastic StackLogstashKibanaCentOS
DevOps Cloud Academy
Written by

DevOps Cloud Academy

Exploring industry DevOps practices and technical expertise.

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.