linux安装部署elasticsearch

linux安装部署elasticsearch 配置账号密码 配置Ik分词器

1.安装elasticsearch

1.1下载对应安装包

我这边用的是7.17.6的安装包
es安装包

1.2 对安装包进行解压

#如果需要指定目录名称 在后面追加
tar -zxvf elasticsearch-7.17.6-linux-x86_64.tar.gz 

1.3.配置elasticsearch文件

配置 elasticsearch-7.17.6/config/elasticsearch.yml 文件

# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: xxx-xxx
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
# 节点名称
node.name: node-test
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#数据文件
path.data: /usr/local/elasticsearch-7.17.6/data
#
# Path to log files:
#日志文件
path.logs: /usr/local/elasticsearch-7.17.6/logs
#
#network.host: 192.168.0.1
#如果需要外网访问设置成0.0.0.0
network.host: 0.0.0.0
#端口号
http.port: 9200
cluster.initial_master_nodes: ["node-test"]

1.4.配置jvm.options文件

配置 elasticsearch-7.17.6/config/jvm.options 文件
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## and the min and max should be set to the same value. For
## example, to set the heap to 4 GB, create a new file in the
## jvm.options.d directory containing these lines:
##
-Xms1024m
-Xmx1024m

1.5.进入bin文件目录启动es

#使用后台启动
./elasticsearch -d 
  • 6
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值