# ---------------------------------- Cluster -----------------------------------
cluster.name: yh-es? ? ? ? ? ? ? ? #? es名稱
# ------------------------------------ Node ------------------------------------
node.name: xibo-es
node.master: true
node.data: true
# ----------------------------------- Paths ------------------------------------
path.data: /usr/local/elasticsearch/data? # 數據存放地址
path.logs: /usr/local/elasticsearch/logs? ?#日志地址
# ----------------------------------- Memory -----------------------------------
bootstrap.memory_lock: true #這個配置的意義:鎖定物理內存地址,防止es內存被交換出去,也就是避免es使用swap交換分區,頻繁的交換,會導致IOPS變高。
# ---------------------------------- Network -----------------------------------
network.host: 127.0.0.1? #ip
http.port: 9200? ? #端口
# --------------------------------- Discovery ----------------------------------
# 轉換為json形式,此時不使用unicode。
# 下列為ip形式
discovery.zen.ping.unicast.hosts: ?["127.0.0.1"]
# 下列為主機名形式
# discovery.zen.ping.unicast.hosts: ["yh-es"]
# ---------------------------------- Various -----------------------------------
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization
http.cors.allow-credentials: true