We're here to assist with any of your needs, don't hestitate to reach out.
ELK Stack is a popular open-source log management and analytics platform. It is comprised of three main components:
Before we start the installation, make sure you have the following prerequisites:
ELK Stack requires Java to run, so let's start by installing Java:
sudo yum install java-1.8.0-openjdk -y
Verify the Java installation by running the following command:
java -version
Next, let's install Elasticsearch:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch sudo vi /etc/yum.repos.d/elasticsearch.repo
Inside the editor, copy and paste the following lines:
[elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Save and exit the file. Then, run the following command to install Elasticsearch:
sudo yum install elasticsearch -y
Start and enable Elasticsearch:
sudo systemctl start elasticsearch sudo systemctl enable elasticsearch
Verify the installation by accessing `http://your_server_ip:9200
` in your web browser. You should see a response containing Elasticsearch's version information.
Now, let's install Logstash:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch sudo vi /etc/yum.repos.d/logstash.repo
Inside the editor, copy and paste the following lines:
[logstash-7.x] name=Elastic repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Save and exit the file. Then, run the following command to install Logstash:
sudo yum install logstash -y
Start and enable Logstash:
sudo systemctl start logstash sudo systemctl enable logstash
Lastly, let's install Kibana:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch sudo vi /etc/yum.repos.d/kibana.repo
Inside the editor, copy and paste the following lines:
[kibana-7.x] name=Kibana repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Save and exit the file. Then, run the following command to install Kibana:
sudo yum install kibana -y
Start and enable Kibana:
sudo systemctl start kibana sudo systemctl enable kibana
Verify the installation by accessing `http://your_server_ip:5601
` in your web browser. You should see the Kibana login screen.
Congratulations! You have successfully installed ELK Stack on your CentOS 7 server. You can now start using Elasticsearch, Logstash, and Kibana to collect, analyze, and visualize your logs and data.
What our customers say about us
Create your free account today.