安装 ElasticSearch Logstash Kibana

新手一步步安装ElasticSearch+Logstash+Kibana

main service version (OS:centos 6.5)

jdk1.8 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)

node js 8.60 (https://nodejs.org/en/download/)

logstash-5.6.3 (https://www.elastic.co/downloads/logstash)

elasticsearch-5.6.1(https://www.elastic.co/downloads/elasticsearch)

elasticsearch-head (https://github.com/mobz/elasticsearch-head)

kibana-5.6.3 (https://www.elastic.co/downloads/kibana)

 

1.install jdk 1.8 can not lower than this version

2.install node js 8.60 (test 4.6 version is not work for elasticsearch-head)

 

 

3.install elasticsearch-5.6.1

 

wget "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.1.tar.gz"

tar -zxvf elasticsearch-5.6.1.tar.gz -C /usr

 

 

change config (path:/usr/elasticsearch-5.6.1/config/elasticsearch.yml)

allow cross access

 

http.cors.enabled: true

http.cors.allow-origin: "*"

http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE

http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type, Content-Length

 

start elasticsearch

Because Elasticsearch can execute script files, for security, the service is not allowed to be started by the root user by default. We need to create a new username and user group to start the service.

 

#add es group

 

groupadd es

 

#add es user and add to es group

 

useradd es -g es -p es

 

#add permission

 

chown -R es:es elasticsearch-5.6.1

 

#change user

 

su es

 

cd /usr/elasticsearch-5.6.1

 

bin/elasticsearch -d

 

 

test elasticsearch in brower

4.install elasticsearch-head

 

wget https://github.com/mobz/elasticsearch-head/archive/master.zip

 

unzip master.zip

 

cd elasticsearch-head-master

 

npm install

 

npm run start

 

test elasticsearch-head in brower

 

5.install kibana-5.6.3 like elasticsearch

change config  (path:/usr/elasticsearch-5.6.3/config/kibana.yml)

start kibana  

 

cd /usr/kibana-5.6.3-linux-x86_64

 

bin/kibana

 

test kibana in brower

 

6.install logstash-5.6.3 like elasticsearch

create a config file "logstash-simple.conf":

input { stdin { } }
output {
elasticsearch { hosts => ["172.28.128.4:9200"] }
stdout { codec => rubydebug }
}

test pust to elasticsearch:

 

cd /usr/logstash-5.6.3

sudo bin/logstash - f llogstash-simple.conf

 

 

 

check:

 

你可能感兴趣的:(安装 ElasticSearch Logstash Kibana)