日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

在tomcat中運行solr-4.3.0

系統 2295 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.

在tomcat中運行solr-4.3.0


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 保定市| 霞浦县| 华亭县| 江城| 黄梅县| 苍山县| 靖西县| 林周县| 西华县| 微山县| 南澳县| 汝州市| 邯郸市| 仲巴县| 紫金县| 扎兰屯市| 黄大仙区| 东明县| 刚察县| 竹山县| 巴青县| 左云县| 连云港市| 淳化县| 内丘县| 澜沧| 剑河县| 景宁| 宝坻区| 镇江市| 广昌县| 内黄县| 普陀区| 屯留县| 讷河市| 五家渠市| 疏勒县| 班玛县| 高安市| 金溪县| 额敏县|