1、下载elasticsearch6.2.1
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.1.tar.gz
2、解压安装
3、启动
因为es为防止远程执行一些脚本,所以启动需要建立一个新的grouop 和user
直接进入bin目录启动
./elasticsearch -d 后台启动
可能出现的问题,
seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
bootstrap.memory_lock: false bootstrap.system_call_filter: false
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
vim /etc/security/limits.conf,在文件最后加上
* soft nproc 6000 * hard nproc 6000 * soft nofile 65536 * hard nofile 65536
[2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
vim /etc/security/limits.d/90-nproc.conf
* soft nproc 6000
[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
使用docker 启动 es6.6.2
总是报下面错误,修改各种系统参数都不行
使用如下命令即可。
docker run --name es2 --ulimit nofile=65530:131072 -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "bootstrap.memory_lock=false" \ -e "bootstrap.system_call_filter=false" -e "network.host=0.0.0.0" -e "http.cors.enabled=true" -e http.cors.allow-origin="*" -p 9200:9200 -p 9300:9300 -d elasticsearch:6.6.2
全文完,感谢您的耐心阅读~
欢迎大家关注我的公众号