-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.bash
44 lines (36 loc) · 1.16 KB
/
install.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# This script will install the ELK Stack such as Elasticsearch, Kubana, Logstash, and FileBeats
# Update the system
sudo apt-get update && sudo apt-get upgrade -y
# Install Docker
sudo apt-get install docker.io -y
# install java jdk 8
sudo apt-get install openjdk-8-jdk -y
# Conditional to install elasticsearch if it is not already installed
if ! [ -x "$(command -v elasticsearch)" ]; then
echo 'Installing Elasticsearch'
docker pull elasticsearch:7.17.20
else
echo 'Elasticsearch is already installed'
fi
# Conditional to install kibana if it is not already installed
if ! [ -x "$(command -v kibana)" ]; then
echo 'Installing Kibana'
docker pull kibana:7.17.20
else
echo 'Kibana is already installed'
fi
# Conditional to install logstash if it is not already installed
if ! [ -x "$(command -v logstash)" ]; then
echo 'Installing Logstash'
docker pull logstash:7.17.20
else
echo 'Logstash is already installed'
fi
# Conditional to install filebeat if it is not already installed
if ! [ -x "$(command -v filebeat)" ]; then
echo 'Installing Filebeat'
docker pull docker.elastic.co/beats/filebeat:7.17.20
else
echo 'Filebeat is already installed'
fi