Step-by-Step Guide to Installing the ELK Stack on Linux
This article walks through the full ELK Stack installation on a Linux test environment, covering component overview, host planning, required packages, detailed command‑line steps for Elasticsearch, Logstash, Kibana and Filebeat, and the necessary firewall and service checks.
Introduction
The Elastic Stack (ELK) is not a single product but a collection of open‑source tools—Elasticsearch, Logstash, Kibana, and Filebeat—used for centralized log collection, search, analysis, and visualization.
Components
Elasticsearch : distributed full‑text search engine.
Logstash : log collection, processing and storage.
Kibana : web UI for filtering and visualizing logs.
Filebeat : lightweight agent that forwards log files.
Test Environment Layout
IP addresses and hostnames are planned as shown in the diagram; all hosts have synchronized time, and the test‑environment firewall is disabled.
Installation Procedure
3.1 Basic Environment Check
[root@elk ~]# hostname elk.test.com [root@elk ~]# cat /etc/hostsVerify that the hosts file contains entries for the ELK nodes and related services.
3.2 Required Packages
[root@elk elk]# wget -c https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/rpm/elasticsearch/2.3.3/elasticsearch-2.3.3.rpm [root@elk elk]# wget -c https://download.elastic.co/logstash/logstash/packages/centos/logstash-2.3.2-1.noarch.rpm [root@elk elk]# wget https://download.elastic.co/kibana/kibana/kibana-4.5.1-1.x86_64.rpm [root@elk elk]# wget -c https://download.elastic.co/beats/filebeat/filebeat-1.2.3-x86_64.rpm3.3 Package Verification
[root@elk elk]# ls elasticsearch-2.3.3.rpm filebeat-1.2.3-x86_64.rpm kibana-4.5.1-1.x86_64.rpm logstash-2.3.2-1.noarch.rpmThe server only needs Elasticsearch, Logstash, and Kibana; the client only needs Filebeat.
3.4 Install Elasticsearch (requires JDK)
[root@elk elk]# yum install java-1.8.0-openjdk -y [root@elk elk]# yum localinstall elasticsearch-2.3.3.rpm -y # Enable and start the service sudo systemctl daemon-reload sudo systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service3.5 Verify Elasticsearch Service
[root@elk elk]# netstat -nltp | grep javaOpen ports 9200 and 9300 in the firewall:
firewall-cmd --permanent --add-port={9200/tcp,9300/tcp} firewall-cmd --reload3.6 Install Kibana
[root@elk elk]# yum localinstall kibana-4.5.1-1.x86_64.rpm -y systemctl enable kibana systemctl start kibanaCheck Kibana status (default process name node, port 5601): netstat -nltp | grep 5601 Open port 5601 in the firewall:
firewall-cmd --permanent --add-port=5601/tcp firewall-cmd --reloadSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
