一.配置准备
1.java jdk安装
2.linux环境配置
修改主机名:/etc/sysconfig/network
HOSTNAME=node003
变量生效 source /etc/sysconfig/network
修改host配置文件
192.168.1.193 node003
192.168.1.194 node004
配置文件存放地点
path.data: /data/elasticsearch/indexdata
path.work: /data/elasticsearch/work
path.logs: /data/elasticsearch/logs
二.es下载安装
curl -L -O http://download.elasticsearch.org/PATH/TO/VERSION.zip
unzip elasticsearch-$VERSION.zip
cd elasticsearch-$VERSION
也可以官网直接下载包解压安装.
安装head插件
cd elasticsearch-2.3.3/bin/
通过如下命令安装head插件
./plugin install mobz/elasticsearch-head
集群配置
cluster.name: ehl_rfid
node.name: node-1
network.host: node003
discovery.zen.ping.unicast.hosts: ["node003", "node004"]
path.data: /data/elasticsearch/indexdata
path.work: /data/elasticsearch/work
path.logs: /data/elasticsearch/logs
传输到node004节点
scp -r /app/elasticsearch root@node004:/app
启动es
bin/elasticsearch
报错不能以root命令启动es
解决方法1
bin/elasticsearch -Des.insecure.allow.root=true
解决方法2
创建es用户(推荐)
adduser ehl
passwd ehl
123456
1.java jdk安装
2.linux环境配置
修改主机名:/etc/sysconfig/network
HOSTNAME=node003
变量生效 source /etc/sysconfig/network
修改host配置文件
192.168.1.193 node003
192.168.1.194 node004
配置文件存放地点
path.data: /data/elasticsearch/indexdata
path.work: /data/elasticsearch/work
path.logs: /data/elasticsearch/logs
二.es下载安装
curl -L -O http://download.elasticsearch.org/PATH/TO/VERSION.zip
unzip elasticsearch-$VERSION.zip
cd elasticsearch-$VERSION
也可以官网直接下载包解压安装.
安装head插件
cd elasticsearch-2.3.3/bin/
通过如下命令安装head插件
./plugin install mobz/elasticsearch-head
集群配置
cluster.name: ehl_rfid
node.name: node-1
network.host: node003
discovery.zen.ping.unicast.hosts: ["node003", "node004"]
path.data: /data/elasticsearch/indexdata
path.work: /data/elasticsearch/work
path.logs: /data/elasticsearch/logs
传输到node004节点
scp -r /app/elasticsearch root@node004:/app
启动es
bin/elasticsearch
报错不能以root命令启动es
解决方法1
bin/elasticsearch -Des.insecure.allow.root=true
解决方法2
创建es用户(推荐)
adduser ehl
passwd ehl
123456
chown -R ehl:123456 elasticsearch
网页查看地址:http://192.168.1.194:9200/_plugin/head/