Service 如何从用户创建的windows服务启动和停止SOLR
我有两个bat文件start.bat和stop.bat用于手动启动和停止SOLR服务器,Service 如何从用户创建的windows服务启动和停止SOLR,service,solr,Service,Solr,我有两个bat文件start.bat和stop.bat用于手动启动和停止SOLR服务器, 我是否可以创建一个windows服务,在启动服务时调用start.bat,在停止服务时调用stop.bat,Solr运行在类似Tomcat的Servlet容器上。因此,要启动Solr,您必须使用Servlet容器配置Solr,然后启动 是的,您当然可以创建Windows服务。但是,您还没有提到运行Solr使用哪个Servlet容器 如果是Apache Tomcat,请点击这里: 1. Just go to
我是否可以创建一个windows服务,在启动服务时调用start.bat,在停止服务时调用stop.bat,Solr运行在类似Tomcat的Servlet容器上。因此,要启动Solr,您必须使用Servlet容器配置Solr,然后启动 是的,您当然可以创建Windows服务。但是,您还没有提到运行Solr使用哪个Servlet容器 如果是Apache Tomcat,请点击这里:
1. Just go to tomcat/bin folder from command prompt
2. Say service.bat install
3. You can see the service being listed in the Microsoft Services
Application
4. Right click on the service and add solr home (in Start
parameters). For an example if your Solr home is in D drive then:
-Dsolr.solr.home="D:\solr"
5.You are done. Just right click on the service, start it or even you can set
it to start automatically when your system starts.
考虑使用Tomcat的Solr多核特性。每个核心就像一个完全成熟的安装,“单独的配置和索引,为不同的应用程序提供各自的配置和模式,但仍然有统一管理的便利性” 即使您不使用多个索引,设置起来也要优雅得多。如果将Tomcat设置为这种方式,则Solr在启动时可用。我假设您使用的是Solr1.4 您需要执行以下步骤: 设置solr根目录 概述
c:\solr
|-lib
|-solr.war
|-solr.xml
c:\solr
|-lib
|-solr.war
|-solr.xml
|-myindexdir
|-bin
|-conf
|-data
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="false" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="myindex" instanceDir="myindexdir" />
</cores>
</solr>
Context docBase="c:\solr\solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="c:\solr\" override="true" />
</Context>
Welcome to Solr!
Solr Admin myindex