Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run solr on a windows server so it starts up automatically?

How can I run solr on a windows server, so it starts up automatically?

I run it with:

java -jar start.jar

but I need the server to do this automatically.

like image 698
Blankman Avatar asked Mar 27 '10 21:03

Blankman


3 Answers

Create a batch file with the command you need and run it on startup: some of these ideas might be of use.

If you ran solr inside tomcat, you could start tomcat as a windows service and set the service to start automatically.

like image 84
Tomislav Nakic-Alfirevic Avatar answered Oct 01 '22 23:10

Tomislav Nakic-Alfirevic


I've had good luck with the "Non-Sucking Service Manager" to do this exact thing. Very simple and lightweight: http://nssm.cc/

like image 43
Tom Lianza Avatar answered Oct 01 '22 23:10

Tom Lianza


The Scheduled Tasks feature in Windows Server will let you configure your command to be executed at startup, without the use of a batch file.

like image 38
Josh Avatar answered Oct 02 '22 00:10

Josh