ELK6.5部署实操及问题解决方案汇总

首先去官网下面下载三个对应的软件:kibana、elasticsearch、logstash,下载最新的即可。本人下载的是6.5

官方下载地址:https://www.elastic.co/products

系统:centos 6.5

配置:1核1G 40G硬盘

环境:jdk1.8、kibana、elasticsearch、logstash

 

声明:

          建议整个ELK环境放在统一一个目录下比较方便管理。  

 

1.安装Elasticsearch

tar -zxvf elasticsearch-6.5.4.tar.gz
cd elasticsearch
#编辑配置文件
vim config/elasticsearch.yml

配置文件底部添加以下信息

cluster.name: es_cluster
node.name: node0
path.data: /tmp/elasticsearch/data  #可改为指定路径
path.logs: /tmp/elasticsearch/logs  #可改为指定路径
#当前hostname或IP,我这里是node0,因为我是单机没做集群。
network.host: 192.168.159.129
http.port: 9200
bootstrap.memory_lock: false   
bootstrap.system_call_filter: false

启动程序

nohup sh elasticsearch > nohup.log &

注:启动过程中可能会有以下几个报错,并根据报错进行处理。

报错1:

[WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node0] uncaught exception in thread [main]

解决方法:

这是因为你配置文件端口没配或者格式配置错了。调整一下再启动即可。

 

报错2:

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决方法:

添加以下信息。

vim /etc/security/limits.conf
elk soft nofile 819200 
elk hard nofile 819200

报错3:

[2]: max number of threads [1024] for user [elk] is too low, increase to at least [4096]

解决方法:

添加以下信息。

vim /etc/security/limits.conf
    soft nproc 4096
    hard nproc 4096

报错4:

[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方法:

vim /etc/sysctl.conf
#末行添加以下信息
vm.max_map_count=655360 
#保存退出后,执行: 
sysctl -p

报错5:

[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

解决方法:

Centos6不支持SecComp,而ES6.5.0默认bootstrap.system_call_filtertrue,需要在配置文件Memory中添加以下两个信息。

bootstrap.memory_lock: false 
bootstrap.system_call_filter: false

报错6:

[WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node0] uncaught exception in thread [main]

解决方法:

报这个错的时候查看一下ip配置文件是否异常,如本地IP不匹配也会报这个错,或者端口占用。

 

测试访问

以上报错都处理完之后查看端口,直接浏览器访问:http://localhost:9200/,看到以下界面就说明部署成功了。

2.部署Logstash

 

3.部署Kibana

tar -zxvf kibana-6.5.4-linux-x86_64.tar.gz 
cd kibana-6.5.4-linux-x86_64

修改配置文件

vim config/kibana.yml 
#添加以下几个信息
server.port: 5601     #访问端口
server.host: 192.168.159.129     #本机IP
elasticsearch.url: http://192.168.159.129:9200    #ES访问地址
kibana.index: “.kibana”

启动

./kibana > nohup.log &

访问http://localhost:5601

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值