Elastic Stack / ELK Quick Install - Ubuntu

Table of Contents

Install ELK / Elastic Stack in Ubuntu.


Use official Elastic Stack 7.x repository:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
apt -y install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" >> /etc/apt/sources.list.d/elastic-7.x.list
apt update


Using filebeat instead of logstash for lower resource requirement.

ELK_PKG="elasticsearch kibana filebeat"
apt -y install ${ELK_PKG}

Auto Start

systemctl daemon-reload
systemctl enable ${ELK_PKG}
systemctl start ${ELK_PKG}
systemctl status ${ELK_PKG}


Application URL
elasticsearch http://localhost:9200
kibana http://localhost:5601

Filebeat and Nginx

Enable nginx log shipping into elasticseach:

filebeat modules enable nginx
filebeat setup


Connect browser to http://localhost:5601 if installing in local machine.

Use ssh tunnel if installing on remote server:

ssh <remote server> -L 5601:localhost:5601

Then connect browser to http://localhost:5601 .

John Siu
Minimize the Effort, Maximize the Effect!
comments powered by Disqus