1. 安装epel源
2. 安装supervisor
1
|
yum -y install supervisor
|
3. 配置supervisord
1
2
3
4
5
|
[program:elasticsearch] command = su -c "/usr/local/data/elasticsearch/bin/elasticsearch" es
directory= /usr/local/data/elasticsearch
numprocs=1 autostart= true
|
4.启动supervisord
1
2
3
4
5
6
|
/etc/init .d /supervisord restart
Stopping supervisord: [ OK ] Starting supervisord: [ OK ] ps -ef | grep java
es 30896 30895 93 02:43 ? 00:00:02 /usr/local/data/jdk1 .8.0_91 //bin/java -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless= true -Dfile.encoding=UTF-8 -Djna.nosys= true -Djdk.io.permissionsUseCanonicalPath= true -Dio.netty.noUnsafe= true -Dio.netty.noKeySetOptimization= true -Dlog4j.shutdownHookEnabled= false -Dlog4j2.disable.jmx= true -Dlog4j.skipJansi= true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home= /usr/local/data/elasticsearch - cp /usr/local/data/elasticsearch/lib/elasticsearch-5 .1.1.jar: /usr/local/data/elasticsearch/lib/ * org.elasticsearch.bootstrap.Elasticsearch
root 30927 21121 0 02:43 pts /0 00:00:00 grep java
|
本文转自 shouhou2581314 51CTO博客,原文链接:http://blog.51cto.com/thedream/1893192,如需转载请自行联系原作者