标签:步骤 elastics 单节点 port 编辑 错误 ase pat for
1:下载tar包
2:tar -zxf 解压
3:进入解压后的ElasticSearch7.4.2目录,创建data目录,mkdir;用于存储以后的索引数据
4 :进入config目录,编辑 elasticsearch.yml文件,
配置如下:
cluster.name: wjx-elasticsearch //集群名称:wjx-elasticsearch
node.name: node-1 //节点名称:node-1,
path.data: /usr/local/elasticsearch-7.4.2/data //数据路径:放入刚创建的data目录中
path.logs: /usr/local/elasticsearch-7.4.2/logs //r日志路径:放入刚创建的data目录中
network.host: 0.0.0.0 //用于设置网络接收,允许所有ip地址访问该elasticsearch.
http.port: 9200 //配置对外访问端口
cluster.initial_master_nodes: ["node-1"] //配置master集群节点,目前单节点:node-1
5:elastic的启动不能使用root用户,新增elasticsearch用户:useradd esuser
6:给esuser赋予权限:chown -R esuser /usr/local/elasticsearch-7.4.2/
7:切换到esuser用户,启动elasticsearch
8:解决错误:错误信息如下:
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
标签:步骤 elastics 单节点 port 编辑 错误 ase pat for
原文地址:https://www.cnblogs.com/wjx6270/p/12234734.html