实验环境:CentOS6.8版本安装ELK5.2,5.0开始之后的版本多了很多环境的校验,比如jdk,max-files等等。此次实验我所使用的安装包全都是rpm包。实验开始前先修改一些内核参数防止后期报错:@H_502_2@
#vim /etc/security/limits.conf@H_502_2@
*softnofile65536 *hardnofile65536
#vim /etc/sysctl.conf@H_502_2@
vm.max_map_count=655360
#sysctl -p@H_502_2@
不要忘了使配置立即生效
@H_502_2@
#cat /etc/redhat-release@H_502_2@
#rpm-ivhjdk-8u121-linux-x64.rpm@H_502_2@
#java -version@H_502_2@
#rpm-ivhelasticsearch-5.2.2.rpm@H_502_2@
#vim /etc/elasticsearch/elasticsearch.yml@H_502_2@
默认配置全都是被注释掉的,直接添加就可以,最后两句是必须有的,否则报错起不来服务的,因为Centos6不支持SecComp@H_502_2@
cluster.name:es-50-test node.name:es-node-1 network.host:0.0.0.0 http.port:9200 http.cors.enabled:true http.cors.allow-origin:"*" bootstrap.memory_lock:false bootstrap.system_call_filter:false
[0][INFO][o.e.b.BootstrapChecks][node-101]boundorpublishingtoanon-loopbackornon-link-localaddress,enforcingbootstrapchecks [0][ERROR][o.e.b.Bootstrap][node-101]nodevalidationexception bootstrapchecksFailed maxnumberofthreads[1024]foruser[elasticsearch]istoolow,increasetoatleast[2048]
如果报以上错误的话在/etc/security/limits.d/90-nproc.conf修改如下内容@H_502_2@
*softnproc1024 改为 *softnproc2048