bat脚本部署ES环境(包含jdk环境变量设置,安装服务,开启服务)

本文提供了一种使用bat脚本快速部署Elasticsearch(ES)环境的方法,包括设置JDK环境变量、安装服务和启动服务。脚本适用于已有一个可运行的ES实例,并希望将其复制到其他环境时的一键部署。脚本中包含了elasticsearch.yml的配置,支持HTTPS和本机IP访问,如不需要HTTPS可进行相应注释。
摘要由CSDN通过智能技术生成

提示

将bat脚本放在ES安装目录下(和bin同一个目录)
需要提前手动部署一个可以运行的ES,此脚本只是为了将ES部署到其他环境时一键部署。
如何安装ES可以参考其他教程。
我这里放了我的ES中config下的elasticsearch.yml的配置:

cluster.name: escluster
node.name: node_1
indices.query.bool.max_clause_count: 10240000  // 可以不设置
xpack.ml.enabled: false

network.host: ip地址

network.bind_host: ip地址
http.cors.enabled: true 
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,content-type
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.verification_mode: certificate
xpack.security.http.ssl.keystore.path: elastic-certificates.p12 
xpack.security.http.ssl.truststore.path: elastic-certificates.p12
http.port: 92
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值