注意:和 Elastic的elasticsearch.yml配置 的区别,该配置文件是/etc/sysconfig/elasticsearch
# Elasticsearch的安装目录
ES_HOME=/usr/share/elasticsearch
# Elasticsearch Java path,Java的安装目录
JAVA_HOME=/usr/java/jdk1.8.0_11
# elasticsearch.yml的目录
CONF_DIR=/etc/elasticsearch
# Elasticsearch的数据存放目录,在elasticsearch.yml中也可以定义
DATA_DIR=/var/lib/elasticsearch
# Elasticsearch logs directory
LOG_DIR=/var/log/elasticsearch
# Elasticsearch PID directory
PID_DIR=/var/run/elasticsearch
# Additional Java OPTS
#ES_JAVA_OPTS=
#注意JAVA_OPTS的区别,AVA_OPTS大多数时候对整个机器环境起作用,
#所以最好是保留默认的JAVA_OPTS,最好用ES_JAVA_OPTS环境变量设置
#来作为JAVA_OPTS参数
#ES_JAVA_OPTS=””
#设置ES的内存堆有三种办法
#1、通过ES_HEAP_SIZE来设置min、max,此时两个值相等[推荐]
#2、通过ES_MIN_MEM和ES_MAX_MEM直接设置
#3、使用ES_JAVA_OPTS来设置,ES_JAVA_OPTS=”-Xms=512M”,ES_JAVA_OPTS=”-Xmx=512M”
#注意:如果值被同时设置时,优先级方法3 > 方法1 > 方法2
#ES_HEAP_SIZE=512M
ES_JAVA_OPTS=”-Xmx128M -Xms128M -Xss128k”
################################
# Elasticsearch service
################################
ES_USER=elasticsearch
ES_GROUP=elasticsearch
# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
ES_STARTUP_SLEEP_TIME=5
################################
# System properties
################################
#最大打开的文件描述符数
MAX_OPEN_FILES=65536
#设置该值为unlimited ,在elasticsearch.yml中设置bootstrap.mlockall: true
#MAX_LOCKED_MEMORY=unlimited
MAX_MAP_COUNT=262144
Pingback引用通告: Elastic的elasticsearch.yml配置详解 | 精彩每一天