本文档目标是elasticsearch能够正常启动,并能达到部署规划中的要求。参数优化将在后续章节中介绍
1 环境变量
1.1 /etc/security/limits.conf
#更改linux的最大文件描述限制要求
* soft nofile 262144
* hard nofile 262144
#更改linux的锁内存限制要求,elasearch为安装Elasticsearch的系统用户
elsearch soft memlock unlimited
elsearch hard memlock unlimited
1.2 /etc/sysctl.conf
vm.max_map_count=262144
vm.swappiness=1
sysctl -p
#修改立即生效
2 配置文件
2.1 config/jvm.options
-Xms1g
-Xmx1g
#根据规划修改内存大小,二者最好一样
2.2 config/elasticsearch.yml
2.2.1 基本信息
集群名称
cluster.name
节点名称
node.name
数据存储路径
path.data
日志存储路径
path.logs
2.2.2 节点角色
master节点
node.master:true
node.ingest:false
node.data:false
data节点
node.master:false
node.ingest:false
node.data:true
ingest节点
node.master:false
node.ingest:true
node.data:false
coordinate节点
node.master:false
node.ingest:false
node.data:false
2.2.3 集群属性
冷热数据节点
node.attr.box_type:"cool"
node.attr.box_type:"hot"
文章转载自lin在路上,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




