elasticsearch 单机安装
ulimit -n
$ jps
12864 Jps
11647 Elasticsearch
kill -9 11647
注jps:jps(Java Virtual Machine Process Status Tool) 是java提供的一个显示当前所有java进程pid的命令
但是这种kill方式不太好,在生产环境中,一般用自己写的shell脚本来停止
elasticsearch停止方式2:指定pid文件
$ ./bin/elasticsearch -p /tmp/elasticsearch-pid -d
找到pid号通过kill命令停止
$ cat /tmp/elasticsearch-pid && echo
15817
$ kill -SIGTERM 15817
./bin/elasticsearch -d -p pid
cd ../elasticsearch-6.5.4.2
./bin/elasticsearch -d -p pid
查看es进程
$ jps
916 Jps
31718 Elasticsearch
28614 Elasticsearch
检查集群状态:
curl -XGET 'http://实际外网ip:9201/_cat/nodes?pretty'
172.21.0.2 81 93 35 0.96 0.50 0.30 mdi - node-2
172.21.0.2 60 93 9 0.96 0.50 0.30 mdi * node-1
检查master:
curl -XGET 'http://实际外网ip:9201/_cat/master?pretty'
vLLRJP2kQfefPTmDT8Vv5w 172.21.0.2 172.21.0.2 node-1
检查所有可显示状态:
curl -XGET 'http://实际外网ip:9201/_cat/nodes?pretty'
172.21.0.2 81 93 35 0.96 0.50 0.30 mdi - node-2
172.21.0.2 60 93 9 0.96 0.50 0.30 mdi * node-1

浙公网安备 33010602011771号