一莫绣、 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 后臺運(yùn)行 ./bin/elasticsearch -d (權(quán)限授權(quán))