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 wi开发者_运维知识库th:
java -jar start.jar
but I need the server to do this automatically.
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.
I've had good luck with the "Non-Sucking Service Manager" to do this exact thing. Very simple and lightweight: http://nssm.cc/
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.
I will add the small solr windwos service installer that I found and updated recently :
https://github.com/serbrech/SolrWindowsService
First Update the App.config
<add key="JavaExecutable" value="C:\Program Files (x86)\Java\jre6\bin\java.exe" />
<add key="WorkingDirectory" value="C:\Solr\apache-solr-4.0\example" />
<add key="Solr.Home" value="solr" />
<add key="CommandLineArgs" value="-Djava.util.logging.config.file=logging.properties" />
<add key="ShowConsole" value="false" />
<add key="Port" value="8983" />
<add key="InstanceName" value="Pageplanner" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
Then run install.bat That's all there is to it.
精彩评论