ELK安装配置

https://www.elastic.co/  

在官网找到自己所需要的版本下载对应的tar.gz文件
我下载的是elasticsearch-5.1.1.tar.gz    由于ELK更新速度很快   最新版本总会有一些坑需要填  旧版本会比较稳定
使用rz上传文件到linux的/usr/local目录下   
tar -xzf 压缩文件名  在该目录下输入当前命令进行解压
进入解压文件夹里的bin目录执行./elasticsearch -d

./elasticsearch为前台运行  但你按下Ctrl+C退出时当前运行的也会close
./elasticsearch -d为后台运行
启动elasticsearch出现报错   
can not run elasticsearch as root
不能使用root账号运行elasticsearch
这时我们需要换一个普通用户

创建一个用户: 输入:useradd elastic

输入 su elastic 登录elastic用户

进入elasticsearch bin 目录,输入 ./elasticsearch -d 启动elastic


启动出错   unable to install syscall filter:

java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.1.1.jar:5.1.1]

报了一大串错误,其实只是一个警告。

解决:使用心得linux版本,就不会出现此类问题了。

参考:http://www.cnblogs.com/sloveling/p/elasticsearch.html

文章其它部分:

问题二:ERROR: bootstrap checks failed

max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]

解决:切换到root用户,编辑limits.conf 添加类似如下内容

vi /etc/security/limits.conf

添加如下内容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

问题三:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

解决:切换到root用户,进入limits.d目录下修改配置文件。

vi /etc/security/limits.d/90-nproc.conf

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

问题四:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

解决:切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

elasticsearch外网IP无法访问
解决办法:vim config/elasticsearch.yml

增加:network.host: 0.0.0.0

然后,重新启动elasticsearch,即可启动成功。正在摸索后期更新

猜你喜欢

转载自blog.csdn.net/m0_37845840/article/details/83314528