How to stop solr with command line

后端 未结 5 1572
囚心锁ツ
囚心锁ツ 2021-02-01 05:52

I want to stop solr by command so if find this article

http://rc98.net/solrinit

echo \"Stopping Solr\"
        cd $SOLR_DIR
        java -Xmx1024m -DSTO         


        
5条回答
  •  独厮守ぢ
    2021-02-01 06:35

    -XmX1024m - is the java parameter and specifies the maximum java heap size, which in your case is set to 1 GB.

    stopkey is a secret key on startup which must also be present on the termination request to enhance security.

    You can find a detailed explanation @ http://docs.codehaus.org/display/JETTY/Securing+Jetty

    Example -

    Starting solr with Jetty -

    java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar
    

    Stopping Solr with Jetty -

    java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar --stop
    

    the STOP.KEY is the secret key which should match during the stop command.

提交回复
热议问题