case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
stop
sleep 5
start
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart}"
exit 1
esac
exit 0
查看启动
netstat -tlnp | egrep '9200|9300'
service elasticsearch status
9、集群验证
curl :9200
curl :9200
curl :9200
ES主机1
ES主机2
ES主机3
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx