创建用户
useradd elasticsearch
解压
tar -zxvf ./tar文件
修改文件用户权限 目录权限
chowm -R elasticsearch解压目录
问题:
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
修改系统参数
/etc/sysctl.conf
vm.max_map_count=262144
启动参数
sysctl -p
进入用户
su elasticsearch
执行 启动后台
./elasticsearch 或 ./elasticsearch -d #后台系统
跨域配置 elasticsearch.yml
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-credentials: true