【问题标题】:How to run Solr 5.0 as a background process in Windows?如何在 Windows 中将 Solr 5.0 作为后台进程运行?
【发布时间】:2015-03-10 18:57:23
【问题描述】:

如何运行“bin/solr.cmd start”脚本以使其在 Windows 的后台运行?以前,您可以在 tomcat 上运行并有效地作为 Windows 服务运行。或者,您可以直接使用“nohup”运行 start.jar,以防止在命令提示符关闭时挂起。

随着 Solr 5.0 的发布,Solr 现在似乎是一个独立的 Java 应用程序,必须使用启动脚本(而不是直接的 jar 文件)启动。

目前,如果在 Windows 上启动启动命令的命令提示符关闭,应用程序将停止。

【问题讨论】:

    标签: java windows solr


    【解决方案1】:

    您可以使用 Apache 通用守护程序库或 sc.exe(Windows 库)将某些东西“安装”为服务,这听起来像是您想要的。

    【讨论】:

      【解决方案2】:

      我从 solr4 升级时遇到了同样的问题

      Solr 5 默认作为后台服务运行。添加 -f 参数将在前台运行它(如果您将其作为 Windows 服务运行,则需要此参数)。

      我正在使用 nssm (https://www.nssm.cc/download) 将 Solr 5 安装为 Windows 服务:

      C:\nssm\nssm64.exe install "Solr 5.3.1" C:\search\solr-5.3.1\bin\solr.cmd "start -f -p 8983"

      【讨论】:

        猜你喜欢
        • 2012-11-17
        • 2011-12-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-07-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多