Skip to content

Instantly share code, notes, and snippets.

@tjws052009
Last active December 21, 2020 02:35
Show Gist options
  • Save tjws052009/2a45a9aa23a02bfeb3b3812c888753b2 to your computer and use it in GitHub Desktop.
Save tjws052009/2a45a9aa23a02bfeb3b3812c888753b2 to your computer and use it in GitHub Desktop.
Setup for CentOS7 Elasticsearch Workshop
#!/bin/bash
# sudo yum update -y
# install elastic yum repo
sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
sudo sh -c "cat > /etc/yum.repos.d/elasticsearch.repo <<EOL
[elastic-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
EOL"
# install nginx yum repo
sudo sh -c "cat > /etc/yum.repos.d/nginx.repo <<EOL
[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/7/x86_64/
gpgcheck=0
enabled=1
EOL"
# set up components necessary for the lab
sudo yum install -y nginx filebeat metricbeat httpd-tools
sudo systemctl enable nginx
sudo systemctl start nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment