zoukankan      html  css  js  c++  java
  • 在tomcat中运行solr4.3.0

    下载solr 4.3,tomcat,解压等操作不必多说.  

    将解压后的solr下的dist目录中的solr-4.3.0.war ,copy到tomcat的webapps目录中,并改名为solr.war

    Solr uses UTF-8 file encoding. That means that we need to ensure
    that Apache Tomcat will be informed that all requests and responses made should use that
    encoding. To do that, we modified the server.xml file in the way shown in the following code:

    <Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443"
    URIEncoding="UTF-8" />

    The third step is to create a proper context file. To do that, create a solr.xml file
    in the $TOMCAT_HOME/conf/Catalina/localhost directory. The contents of
    the file should look like the following code:

    <Context path="/solr" docBase="/usr/share/tomcat/webapps/solr.war"
    debug="0" crossContext="true">
    <Environment name="solr/home" type="java.lang.String" value="/
    usr/share/solr/" override="true"/>
    </Context>

    以上配置中,docBase为tomcat/webapps/solr.war的路径,下面的路径为下载solr目录中example/solr的路径,根据自己需要更改配置。

    这时候运行tomcat会报错     org.apache.catalina.core.StandardContext startInternal SEVERE: Error filterStart

                  org.apache.catalina.core.StandardContext startInternal

     上网查了下原因,首先看这个http://wiki.apache.org/solr/SolrLogging   ,solr4.3的war包中不包含任何日志的jar包,你需要自己手动添加。将solr目录下example\lib\ext中的jar包copy到tomcat的lib中。这时候虽然添加jar包,但是没有对应的日志配置,需要将example\resources中的log4j.properties也放到tomcat/lib中。当然,你可以根据自己的需要更改配置。

    启动tomcat,可以看到日志信息,确认已经成功启动  打开 http://localhost:8080/solr/ 

    If you see the page with links to administration pages of each of the cores defined, that
    means that your Solr is up and running.

  • 相关阅读:
    bootstrap模态框手动开启关闭与设置点击外部不关闭
    mybatis的增删改查返回值小析(六)
    mac安装python本版管理工具pyenv
    taro 编译 建议修改:使用循环的 index 变量作为 key 是一种反优化
    taro-多个input同一个事件处理
    python初探(01D) line 2 SyntaxError: Non-ASCII character 'xe8' 报错
    taro父、子组件通信
    taro---image引入图片
    webpack(五)---模块热替换
    webpack(四)---开发系列
  • 原文地址:https://www.cnblogs.com/hupengcool/p/3072573.html
Copyright © 2011-2022 走看看