1. # Path to directory where to store the data (separate multiple locations by comma):
    2. #
    3. path.data: /home/elasticsearch/lib
    4. #
    5. # Path to log files:
    6. #
    7. path.logs: /home/elasticsearch/logq
    8. # 单节点启动,可选
    9. etwork.host: 0.0.0.0
    10. node.name: node-1
    11. cluster.initial_master_nodes: ["node-1"]
    1. # JDK 9+ GC logging
    2. 9-:Xlog:gc*,gc+age=trace,safepoint:file=/home/elasticsearch/log/gc.log:utctime,pid,tags:filecount=32,filesize=64m
    1. useradd -s /sbin/nologin elasticsearch
    1. export ES_JAVA_HOME=/usr/share/elasticsearch/jdk
    1. su -s /bin/bash -m -c "source /home/elasticsearch/.bashrc && /usr/share/elasticsearch/bin/elasticsearch -d" elasticsearch