下载
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz
tar -xzvf elasticsearch-2.4.6.tar.gz
cd elasticsearch-2.4.6/
配置
cd elasticsearch-2.4.6/
cd config
vim elasticsearch.yml
cluster.name: yuantues
node.name: master
network.host: 192.168.100.35
http.port: 8200
discovery.zen.ping.unicast.hosts: [“192.168.100.35”]
保存
配置解释
#集群名称
cluster.name: yuantues
单节点名称
node.name: master
#设置绑定的ip地址
network.host: 192.168.100.35
#端口
http.port: 8200
找到master节点
discovery.zen.ping.unicast.hosts: [“192.168.100.35”]
启动
./bin/elasticsearch -Des.insecure.allow.root=true
后台启动
./bin/elasticsearch -Des.insecure.allow.root=true -d
停止
前台启动的:Ctrl + C
后台启动的:kill -9 pid
转载于:https://my.oschina.net/mengzhang6/blog/1788368