软件下载地址

快 https://repo.huaweicloud.com/elasticsearch/
慢 https://www.elastic.co/cn/downloads/past-releases#elasticsearch
注意:安装es需要内存至少4G,否则安装不成功

解压与修改配置文件

tar -zxvf elasticsearch-7.4.2-linux-x86_64.tar.gz -C /usr/local/

  /usr/local/elasticsearch-7.4.2/config
  vi elasticsearch.yml

  

  # 加入如下配置
  cluster.name: elasticsearch
  # 修改集群名称
  node.name: node-1
  # 修改data数据保存地址
  path.data=/usr/local/elasticsearch-7.4.2/data
  # 修改log数据保存地址
  path.log=usr/local/elasticsearch-7.4.2/log
  # 修改ip允许访问地址
  network.host: 0.0.0.0
  # 修改访问端口
  http.port: 9200
  # 集群初始化节点
  cluster.initial_master_nodes: ["node-1"]

修改 /etc/security/limits.conf

# 每个进程可以打开的文件数的限制
* soft nofile 65536
* hard nofile 131072
# 操作系统级别对每个用户创建的进程数的限制
* soft nproc 2048
* hard nproc 4096

修改/etc/sysctl.conf

# 在文件中增加下面内容
# 一个进程可以拥有的 VMA(虚拟内存区域)的数量,默认值为 65536
vm.max_map_count=655360

创建用户

# 添加esuser用户
useradd esuser
# 赋权
chown -R esuser:esuser /usr/local/elasticsearch-7.4.2/

重新加载

sysctl -p

启动

su esuser
# 进入$ES_HOME/bin
cd /usr/local/elasticsearch-7.4.2/bin
# 后台启动es
./elasticsearch -d
访问:
ip:端口

 

 

 


使用客户端

下载ElasticHD,缺点无法一键启动的。
可以在ElastcHD.exe同级目录下创建一个bat文件,文件内容如下即可
ElasticHD -p 127.0.0.1:9800
双击即可看到如下的目录

 

 

引用链接:https://www.cnblogs.com/shine-rainbow/p/15502541.html#_label1

     https://zhuanlan.zhihu.com/p/462990122

posted on 2022-10-31 15:25  topass123  阅读(662)  评论(0编辑  收藏  举报