elasticsearch5.6.4安装配置备忘

277 阅读1分钟

   

 安装es 5.6.4 需要调整的参数
----系统内核及limit 主要是一些打开句柄数及内存的限制 

###优化limits.conf 
cat > /etc/security/limits.conf << EOF 
###优化limits.conf
*  soft     nofile    65536
*  hard    nofile    65536
*  soft     nproc     65536
*  hard    nproc     65536
*  soft     memlock   unlimited
*  hard    memlock   unlimited 
EOF 
退出用户重新登录 使limit参数生效  

###系统内核参数 sysctl.conf 
cat >> /etc/sysctl.conf <<EOF 
vm.max_map_count = 262144 
EOF  
sysctl -p    使内核参数调整生效 

----jvm参数及yml配置 

# config/jvm.options  
# Xms represents the initial size of total heap space 
# Xmx represents the maximum size of total heap space 
# 这里xms和xmx建议修改为相同,且不要超过机器可用内存的 1/2 
-Xms3g
-Xmx3g 

# config/elasticsearch.yml  
cluster.name: clustername 
node.name: nodename 
path.data: /data/server-data/elasticsearch 
path.logs: /data/server-logs/elasticsearch 
bootstrap.memory_lock: true 
network.host: nodeip 
http.port: 9200 
discovery.zen.ping.unicast.hosts: 
- nodeip 
- othernodeip 
- othernodeip 
- othernodeip 
- othernodeip 
http.cors.enabled: true 
http.cors.allow-origin: '*' 
http.cors.allow-headers: X-Requested-With, Content-Type, Content-Length, Authorization
http.cors.allow-methods: '*'
http.cors.allow-credentials: true
indices.query.bool.max_clause_count: 10240
action.destructive_requires_name: true
xpack.security.enabled: false