Skip to content

Instantly share code, notes, and snippets.

@0xbepresent
Last active January 22, 2020 00:41
Show Gist options
  • Save 0xbepresent/0b2b80b186917a46c03da5a845db7c91 to your computer and use it in GitHub Desktop.
Save 0xbepresent/0b2b80b186917a46c03da5a845db7c91 to your computer and use it in GitHub Desktop.
echo "Installing Docker..."
sudo apt -y update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt -y update
apt-cache policy docker-ce
sudo apt install -y docker-ce
echo "Download ElasticSearch..."
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.5.1
echo "Download Kibana..."
docker pull docker.elastic.co/kibana/kibana:7.5.2
echo "Starting ElasticSearch..."
docker run -d --rm -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "transport.host=127.0.0.1" -e ELASTIC_PASSWORD=secret --name elastic docker.elastic.co/elasticsearch/elasticsearch:7.5.1 && sleep 20
echo "Starting Kibana"
docker run -d --rm --link elastic:elasticsearch -e "ELASTICSEARCH_URL=http://elasticsearch:9200" -e ELASTICSEARCH_PASSWORD="secret" -p 5601:5601 --name kibana docker.elastic.co/kibana/kibana:7.5.2 && sleep 20
sudo apt-get install default-jre
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt update
sudo apt install elasticsearch
nano /etc/elasticsearch/elasticsearch.yml
systemctl start elasticsearch
systemctl enable elasticsearch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment