前提准备
jdk安装包
elasticsearch安装包
1、在/app下创建es文件夹 创建/app/es/eslogs文件夹(每台机器)
传入相关压缩文件解压后 elasticsearch-6.3.1 jdk1.8.0_181
安装用户为es
2、安装jdk(每台机器)
配置环境变量
vi ~/.bash_profile
JAVA_HOME=/app/es/jdk1.8.0_181
JRE_HOME=${JAVA_HOME}/jre
CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
PATH=${JAVA_HOME}/bin:$PATH
export JAVA_HOME JRE_HOME CLASSPATH PATH
保存退出
source ~/.bash_profile
3、修改系统参数(每台机器;需root管理员)
vi /etc/sysctl.conf
es vm.max_map_count=262144
执行 sysctl -p 生效
vi /etc/security/limits.conf
es hard nofile 65536
vi /etc/security/limits.conf
es soft memlock unlimited
es hard memlock unlimited
重新登录生效
4、data节点硬盘挂载(data节点操作)
相关运维人员完成T级别磁盘挂载
5、修改elasticsearch-6.3.1/config/jvm.options和elasticsearch-6.3.1/config/elasticsearch.yml
## JVM configuration
################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms1g
## -Xmx1g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms31g
-Xmx31g
(1)master节点 三台机器分别是
cluster.name: pass-es
node.name: master-1
node.data: false
node.master: true
path.logs: /app/es/eslogs
bootstrap.memory_lock: true
network.host: 134.108.0.98
http.port: 9200
discovery.zen.ping.unicast.hosts: ["134.108.0.98", "134.108.0.99", "134.108.0.100","134.108.0.101",