安装elasticsearch-8.5.2

安装elasticsearch-8.5.2

1. 下载

https://www.elastic.co/cn/downloads/elasticsearch
在这里插入图片描述

2. 安装

(base) [root@node001 bao]# tar -zxvf elasticsearch-8.5.2-linux-x86_64.tar.gz -C /opt/src

3. 修改配置文件

[root@node001 config]# vim /opt/src/elasticsearch-8.5.2/config/elasticsearch.yml
path.data: /opt/src/elasticsearch-8.5.2/data      #数据目录位置
path.logs: /opt/src/elasticsearch-8.5.2/logs      #日志目录位置
network.host: 0,0,0,0                             #允许任何ip来访问
network.publish_host: node001
ingest.geoip.downloader.enabled: false

xpack.security.enabled: false # 安全配置
xpack.security.enrollment.enabled: false # 安全配置
 
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
 
 
 
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Type,Content-Length

[root@node001 config]# vim /opt/src/elasticsearch-8.5.2/config/jvm.options
-Xms512m
-Xmx512m

[root@node001 config]# vim /etc/security/limits.conf
* hard nofile 65536
* soft nofile 65536
[root@node001 config]# vim /etc/sysctl.conf
vm.max_map_count=262144

4.用户授权

adduser es
passwd es
chown -R es:es /opt/src/elasticsearch-8.5.2/
chmod 770 /opt/src/elasticsearch-8.5.2/

5.启动验证

su es
/opt/src/elasticsearch-8.5.2/bin/elasticsearch -d

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值