Elasticsearch单机多节点安装

下面以一机3节点为例:
mkdir /apps
上传部署包到/apps下面
Elasticsearch单机多节点安装_第1张图片
创建es数据路径文件:
mkdir /apps/elasticsearch-2.3.5/esdatas
mkdir /apps/elasticsearch-2.3.5/esdatas/instance1
mkdir /apps/elasticsearch-2.3.5/esdatas/instance2
mkdir /apps/elasticsearch-2.3.5/esdatas/instance3
创建eslog日志路径文件:
mkdir /apps/elasticsearch-2.3.5/eslogs
mkdir /apps/elasticsearch-2.3.5/eslogs/instance1
mkdir /apps/elasticsearch-2.3.5/eslogs/instance2
mkdir /apps/elasticsearch-2.3.5/eslogs/instance3
创建es配置文件路径:
mkdir /apps/elasticsearch-2.3.5/config/instance1
mkdir /apps/elasticsearch-2.3.5/config/instance2
mkdir /apps/elasticsearch-2.3.5/config/instance3
把原先配置文件复制进配置文件夹里面
cp -r /apps/elasticsearch-2.3.5/config/scripts/ /apps/elasticsearch-2.3.5/config/instance1
cp -r /apps/elasticsearch-2.3.5/config/scripts/ /apps/elasticsearch-2.3.5/config/instance2
cp /apps/elasticsearch-2.3.5/config/logging.yml /apps/elasticsearch-2.3.5/config/instance1/logging.yml
cp /apps/elasticsearch-2.3.5/config/logging.yml /apps/elasticsearch-2.3.5/config/instance2/logging.yml

cp /apps/elasticsearch-2.3.5/config/elasticsearch.yml /apps/elasticsearch-2.3.5/config/instance1/elasticsearch.yml
cp /apps/elasticsearch-2.3.5/config/elasticsearch.yml /apps/elasticsearch-2.3.5/config/instance2/elasticsearch.yml

修改配置文件
vim /apps/elasticsearch-2.3.5/config/instance1/elasticsearch.yml
Elasticsearch单机多节点安装_第2张图片
Elasticsearch单机多节点安装_第3张图片
Elasticsearch单机多节点安装_第4张图片
具体实例下载地址:
链接:https://pan.baidu.com/s/17q-wLyFdgGWLj4evmWlG3Q
提取码:wgot

启动:
/apps/elasticsearch-2.3.5/bin/elasticsearch -Des.path.conf=config/instance1 -d -p /tmp/elasticsearch_1.pid
/apps/elasticsearch-2.3.5/bin/elasticsearch -Des.path.conf=config/instance2 -d -p /tmp/elasticsearch_1.pid
/apps/elasticsearch-2.3.5/bin/elasticsearch -Des.path.conf=config/instance3 -d -p /tmp/elasticsearch_1.pid

你可能感兴趣的:(elasticsearch)