虚拟机安装elasticsearch5.0.x-安装篇

一、 elasticsearch 不允许用root用户直接操作。所以需要先注册一个用户。

1 [root@localhost elasticSearch]# useraddelastic

 2 [root@localhost elasticSearch]# passwd elastic

二、下载elasticsearch

1 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.tar.gz

三 启动报错

ERROR: [4] bootstrap checks failed

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

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

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

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

解决办法:

1 vi /etc/security/limits.conf

elasticsearch hard nofile65536# 针对 maxfiledescriptors

elasticsearch soft nproc2048# 针对 max number of threads

2 vi  /etc/sysctl.conf

vm.max_map_count=262144# 针对 max virtual memory areas

3 vi /etc/elasticsearch/elasticsearch.yml

bootstrap.system_call_filter:false# 针对 system call filters failed toinstall, 参见

启动

1 ./bin/elasticsearch 

2 后台运行 ./bin/elasticsearch -d (权限授权)

你可能感兴趣的:(虚拟机安装elasticsearch5.0.x-安装篇)