How To Install Elasticsearch, Logstash and Kibana on Ubuntu 18.04
Requirment
login: user with root privileges
OS: Ubuntu 18.04
RAM: 4GB
CPU: 2
Java: Oracle JDK 8 version
The same instructions apply for Ubuntu 17.04/16.04, Linux Mint, Debian, Kubuntu and Elementary OS
Update/upgrade
1. sudo apt update
2. sudo apt-get upgrade -y
-------------------------------------------------------
Install dependencies and java 8
1. sudo add-apt-repository ppa:webupd8team/java
2. sudo apt-get update OR sudo apt update
3. sudo apt install openjdk-8-jdk
Verify the Java
1. java -version
-------------------------------------------------------
ELASTICSEARCH
Install and configure Elasticsearch
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-amd64.deb
3. sudo dpkg -i elasticsearch-7.5.2-amd64.deb
Elasticsearch configuration file
1. sudo nano /etc/elasticsearch/elasticsearch.yml
network.host to [local, eth0]
nano /etc/init.d/elasticsearch
Locate the line:
# network.host: localhost
start and enable the service
1. sudo systemctl enable elasticsearch.service
2. sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch.service
OR
/etc/init.d/elasticsearch start
3. /etc/init.d/elasticsearch status
Verify Elasticsearch
1. curl -X GET "localhost:9200/"
open web browser
1. http://server_ip:9200/ or http://localhost:9200/
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:5.0.0
-------------------------------------------------------
KIBANA
Now, Install and configure Kibana
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/kibana/kibana-7.5.2-amd64.deb
3. sudo dpkg -i kibana-7.5.2-amd64.deb
Configuration file Kibana
1. sudo nano /etc/kibana/kibana.yml
Locate the following lines:
#server.host: "localhost"
#elasticsearch.url: "http://localhost:9200"
to
Change those lines to:
server.host: "SERVER_IP"
elasticsearch.hosts: "http://SERVER_IP:9200"
1. sudo sysctl -w vm.max_map_count=262144
start and enable the service
1. sudo systemctl enable kibana.service
2. sudo systemctl start kibana.service
3. sudo systemctl status kibana.service
open web browser
1. http://server_ip:5601/ or ip_address:5601
-------------------------------------------------------
LOGSTASH
Now, Install and configure Logstash
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/logstash/logstash-7.5.2.deb
3. sudo dpkg -i logstash-7.5.2.deb
Configuration file logstash
1. sudo nano /etc/logstash/logstash.yml
Locate the line:
# http.host: "127.0.0.1"
start and enable the service
1. sudo systemctl enable logstash.service
2. sudo systemctl start logstash.service
3. sudo systemctl status logstash.service
Requirment
login: user with root privileges
OS: Ubuntu 18.04
RAM: 4GB
CPU: 2
Java: Oracle JDK 8 version
The same instructions apply for Ubuntu 17.04/16.04, Linux Mint, Debian, Kubuntu and Elementary OS
Update/upgrade
1. sudo apt update
2. sudo apt-get upgrade -y
-------------------------------------------------------
Install dependencies and java 8
1. sudo add-apt-repository ppa:webupd8team/java
2. sudo apt-get update OR sudo apt update
3. sudo apt install openjdk-8-jdk
Verify the Java
1. java -version
-------------------------------------------------------
ELASTICSEARCH
Install and configure Elasticsearch
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-amd64.deb
3. sudo dpkg -i elasticsearch-7.5.2-amd64.deb
Elasticsearch configuration file
1. sudo nano /etc/elasticsearch/elasticsearch.yml
network.host to [local, eth0]
nano /etc/init.d/elasticsearch
Locate the line:
# network.host: localhost
start and enable the service
1. sudo systemctl enable elasticsearch.service
2. sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch.service
OR
/etc/init.d/elasticsearch start
3. /etc/init.d/elasticsearch status
Verify Elasticsearch
1. curl -X GET "localhost:9200/"
open web browser
1. http://server_ip:9200/ or http://localhost:9200/
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:5.0.0
-------------------------------------------------------
KIBANA
Now, Install and configure Kibana
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/kibana/kibana-7.5.2-amd64.deb
3. sudo dpkg -i kibana-7.5.2-amd64.deb
Configuration file Kibana
1. sudo nano /etc/kibana/kibana.yml
Locate the following lines:
#server.host: "localhost"
#elasticsearch.url: "http://localhost:9200"
to
Change those lines to:
server.host: "SERVER_IP"
elasticsearch.hosts: "http://SERVER_IP:9200"
1. sudo sysctl -w vm.max_map_count=262144
start and enable the service
1. sudo systemctl enable kibana.service
2. sudo systemctl start kibana.service
3. sudo systemctl status kibana.service
open web browser
1. http://server_ip:5601/ or ip_address:5601
-------------------------------------------------------
LOGSTASH
Now, Install and configure Logstash
1. cd /tmp
2. wget https://artifacts.elastic.co/downloads/logstash/logstash-7.5.2.deb
3. sudo dpkg -i logstash-7.5.2.deb
Configuration file logstash
1. sudo nano /etc/logstash/logstash.yml
Locate the line:
# http.host: "127.0.0.1"
start and enable the service
1. sudo systemctl enable logstash.service
2. sudo systemctl start logstash.service
3. sudo systemctl status logstash.service