安装 ElasticSearch Logstash Kibana

本文详细介绍了如何在CentOS 6.5上安装并配置ElasticSearch、Logstash及Kibana(ELK Stack),包括所需最低JDK版本、Node.js版本及各组件的下载链接。文中还提供了启动服务所需的步骤及注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

新手一步步安装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:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值