In the landscape of data analysis and visualization, the ELK Stack has emerged as a powerful toolset. Comprising Elasticsearch, Logstash, and Kibana, the ELK Stack enables real-time data search, analysis, and visualization. This article provides a detailed walkthrough on installing the ELK Stack on Fedora 39.
What is the ELK Stack?
The ELK Stack is an integrated solution for managing and understanding complex data systems. It includes:
- Elasticsearch: A search and analytics engine.
- Logstash: A server-side data processing pipeline.
- Kibana: A tool for visualizing data with charts and graphs.
These tools are invaluable for system administrators, developers, and DevOps professionals who need to interpret logs and understand complex data systems.
Prerequisites
Before proceeding with the installation of the ELK Stack on Fedora 39, ensure that you meet the following prerequisites:
- A server running Fedora 39.
- A fresh OS install is recommended to prevent potential issues.
- Access to the terminal to execute commands.
- Internet connectivity to download the ELK Stack packages.
- Access to a non-root sudo user or the root user. It’s safer to operate as a non-root sudo user.
Installation Steps
Step 1: Update your Fedora system
Before starting with the ELK Stack installation, update your Fedora system and install the necessary dependencies:
sudo dnf clean all sudo dnf update
Step 2: Install Java
As Elasticsearch requires Java to operate, install OpenJDK using the following commands:
sudo dnf install lsof java-17-openjdk java-17-openjdk-devel
Verify the installation by checking the Java version:
java -version
Step 3: Install Elasticsearch
Elasticsearch forms the backbone of the ELK Stack. To install it, first import the GPG key:
sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
Next, create a file named elasticsearch.repo
in /etc/yum.repos.d/
and add the repository configuration:
sudo nano /etc/yum.repos.d/elasticsearch.repo
Add the following configuration:
[elasticsearch-8.x] name=Elasticsearch repository for 8.x packages baseurl=https://artifacts.elastic.co/packages/8.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Now, install Elasticsearch and start the service:
sudo dnf install elasticsearch-oss
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
Step 4: Install Kibana
Kibana provides visualization capabilities for data stored in Elasticsearch. Install Kibana and start the service as follows:
sudo dnf install kibana-oss sudo systemctl enable kibana.service sudo systemctl start kibana.service
Generate the enrollment token:
/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
Step 5: Install Logstash
Logstash is used for processing incoming data and feeding it into Elasticsearch. Add the Logstash repository and install it:
echo '[logstash-8.x] name=Elastic repository for 8.x packages baseurl=https://artifacts.elastic.co/packages/8.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md' | sudo tee /etc/yum.repos.d/logstash.repo sudo dnf install logstash
Step 6: Configure Elasticsearch and Kibana
Edit the configuration files for Elasticsearch ( /etc/elasticsearch/elasticsearch.yml
) and Kibana ( /etc/kibana/kibana.yml
). Set up user authentication and define access controls to secure your ELK Stack.
Step 7: Access Kibana Dashboard
Access the Kibana dashboard through a web browser at http://localhost:5601
. Use the enrollment token generated earlier to set up credentials and access Kibana.
For businesses that require expertly managed, scalable, and secure hosting solutions, consider Shape.host and their Linux SSD VPS services. With years of experience and a commitment to customer satisfaction, Shape.host can provide the infrastructure you need to succeed.