简体   繁体   中英

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.

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/

Windows Server中的“计划任务”功能将允许您将命令配置为在启动时执行,而无需使用批处理文件。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM