加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows – 如何在Tomcat本地运行Solr 4?

发布时间:2020-12-13 20:49:18 所属栏目:Windows 来源:网络整理
导读:我一直在尝试在我的家庭电脑上安装Solr 4.3(在Tomcat 7中),但是没有运行。我已经设置了Tomcat并部署了解压缩文件,这两个文件都解压缩并显示在Tomcat的Tomcat Web Apps Manager屏幕中,但它没有运行,并且单击开始按钮不会执行任何操作(因为它应该已经在第
我一直在尝试在我的家庭电脑上安装Solr 4.3(在Tomcat 7中),但是没有运行。我已经设置了Tomcat并部署了解压缩文件,这两个文件都解压缩并显示在Tomcat的Tomcat Web Apps Manager屏幕中,但它没有运行,并且单击开始按钮不会执行任何操作(因为它应该已经在第一名)。

这是Tomcat中的solr.xml上下文文件,它也给出了solr.war文件的路径,我的solr核心是哪个(默认的Collection1):

<Context path="/solr" docBase="C:/LocalApps/Tomcat/apache-tomcat-7.0.40/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="C:/LocalApps/Solr/solr-4.3.0/example/solr/" override="true"/>
</Context>

这是tomcat中的错误日志:

INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
Jun 09,2013 11:04:07 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:LocalAppsTomcatapache-tomcat-7.0.40confCatalinalocalhostsolr.xml
Jun 09,2013 11:04:07 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase C:LocalAppsTomcatapache-tomcat-7.0.40webappssolr.war inside the host appBase has been specified,and will be ignored
Jun 09,2013 11:04:07 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
Jun 09,2013 11:04:09 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Jun 09,2013 11:04:09 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/solr] startup failed due to previous errors
您需要安装用于日志记录的jar,如 here所述。

将所有提到的文件复制到您的tomcat / lib目录中。并重新启动Tomcat。

  1. Copy the jars from solr/example/lib/ext into your container’s main lib directory. These jars will set up SLF4J and log4j.
    Exactly where this lib directory is highly variable. For a Debian or
    Ubuntu server using the Tomcat package available from the OS vendor,
    this is likely to be /usr/share/tomcat6/lib or
    /usr/share/tomcat7/lib.
  2. Copy the logging config from solr/example/resources/log4j.properties into a location on the
    classpath. Usually you can use the same location as the jar files
    above. Edit the configuration file for your preferred log destination.
  3. Optionally,if you did not place log4j.properties on the classpath,set java option -Dlog4j.configuration=file:///path/to/log4j.properties

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读