Category:ELK学习
Article From:https://www.cnblogs.com/liufei1983/p/9127080.html

1: install JAVA8

         Add PPA

   sudo add-apt-repository ppa:webupd8team/java
   sudo apt-get update
Install oracle-java-installer
 sudo apt-get install oracle-java8-installer
Setting system default JDK
sudo update-java-alternatives -s java-8-oracle

javaInstallation test
java -version
javac -version

Two install elasticsearch

https://www.elastic.co/guide/en/beats/libbeat/6.2/elasticsearch-installation.html

(If CURL is not installed, run: sudo apt install curl

sudo apt-get install openjdk-8-jre
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.deb
sudo dpkg -i elasticsearch-6.2.4.deb
sudo /etc/init.d/elasticsearch start

localhost:9200

elasticsearchInstallation path: * /etc/elasticsearch/elasticsearch.yml

(Note: VI’s problems are dealt with:

                 sudo apt-get remove vim-common

             sudo apt-get install vim

 

Install logstash:
https://www.elastic.co/guide/en/beats/libbeat/6.2/logstash-installation.html
sudo apt-get install openjdk-8-jre
curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-6.2.4.deb
sudo dpkg -i logstash-6.2.4.deb
Do not start, do some configuration

/etc/logstash/conf.d Below
input {
beats {
port => 5044
}
}

# The filter part of this file is commented out to indicate that it is
# optional.
# filter {
#
# }

output {
elasticsearch {
hosts => “localhost:9200”
manage_template => false
index => “%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}”
document_type => “%{[@metadata][type]}”
}
}

./bin/logstash-plugin update logstash-input-beats
(/usr/share/logstash/bin/logstash-plugin)

Start logstash:
sudo /etc/init.d/logstash start(This order is not good for use)

In this directory: /usr/share/logstash;
./bin/logstash -f logstash.conf( Create logstash.conf under this directory.)

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
Install Kibana:
https://www.elastic.co/guide/en/beats/libbeat/6.2/kibana-installation.html
curl -L -O https://artifacts.elastic.co/downloads/kibana/kibana-6.2.4-linux-x86_64.tar.gz
tar xzvf kibana-6.2.4-linux-x86_64.tar.gz
cd kibana-6.2.4-linux-x86_64/
./bin/kibana

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
install filebeat:
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.2.4-amd64.deb
sudo dpkg -i filebeat-6.2.4-amd64.deb

/etc/filebeat/filebeat.yml

#—————————– Logstash output ——————————–
output.logstash:
hosts: [“127.0.0.1:5044”]

 

Link of this Article: 2 Ubuntu 16.04 install Elastic Stack

Leave a Reply

Your email address will not be published. Required fields are marked *