因为elasticsearch不能用root启动,否则启动会报错
1.创建一个用户
useradd elasticsearch
2.对解压下面的文件都赋予权限
chown -R elasticsearch:elasticsearch /home/elasticsearch-7.3.2/
ip访问
# 增加
network.host: 0.0.0.0
3.
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
vi /etc/security/limits.conf
在倒数第二行
* soft nofile 65536
* hard nofile 65536
# End of file
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
vi /etc/sysctl.conf
添加
vm.max_map_count=655360
保存后执行
sysctl -p
ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
修改
elasticsearch.yml
取消注释保留一个节点
cluster.initial_master_nodes: ["node-1"]
这个的话,这里的node-1是上面一个默认的记得打开就可以了
重启 正常