Elasticsearch 配置文件说明

属性配置文件

{elasticsearch_home}/config/elasticsearch.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 集群名称
cluster.name: test-cluster
# 节点名称
node.name: node-1
# 数据目录
path.data: /data/elastic/es-data
# 日志目录
path.logs: /data/elastic/es-logs
# 绑定 IP
network.host: 192.168.0.1
# 是否开启认证
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# 是否开启 https
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# 初始化时的主节点设置
cluster.initial_master_nodes: ["node-1"]
# 访问 IP 限制 0.0.0.0 表示允许任意 IP 访问
http.host: 0.0.0.0

jvm配置文件

{elasticsearch_home}/config/jvm.options

设置运行内存

1
2
-Xms4g
-Xmx4g
作者

Gnerv - Li Gen

发布于

2023-05-29

更新于

2023-05-29

许可协议