Tomcat、TongWeb5.0、TongWeb6.0部署solr

将solr,solr-4.7.2复制到某一路径下,比如F盘根目录。

1、tomcat中进行配置,配置如下:

<Context docBase="F:/solr" reloadable="true" > 

    <Environment name="solr/home" type="java.lang.String" value="F:/solr-4.7.2/example/solr" override="true" /> 

</Context> 

将tomcat启动,启动solr服务器,就可以进行索引创建及查询了。




2、东方通TongWeb5.0中进行配置。配置如下:

   a、东方通安装目录下  **TongWeb5.0config wns.xml 的<deployments></deployments>标签中间添加

              <web-app context-root="solr" name="solr" source-path="F:solr" />

   b、solr主目录配置: F:solrWEB-INFweb.xml 中加入

    <env-entry>

       <env-entry-name>solr/home</env-entry-name>

       <env-entry-value>F:solr-4.7.2examplesolr</env-entry-value>

       <env-entry-type>java.lang.String</env-entry-type>

    </env-entry>


 


3、东方通TongWeb6.0中进行配置,配置如下:


  a、把solr1solr-4.7.2distsolr-4.7.2.war包复制到TongWeb6.0autodeploy目录下


  b、在TongWeb6.0in ongweb.xml文件里添加:


     <web-app name="solr-4.7.2"  original-location="D:TongWeb6.0autodeploysolr-4.7.2.war"


       location="${tongweb.app}solr-4.7.2" context-root="/solr-4.7.2" vs-names="server" is-directory="false" enabled="true" description="autodeploy---solr-4.7.2.war" deploy-order="100" object-type="user" jsp-      compile="false" dtd-validate="false"   is-autodeploy="true" version="" retire-state="none" retire-strategy="nature"  retire-timeout="0" version-serial-number="1"/>


      指定war位置和系统访问路径。


  c、将solr1solr-4.7.2example目录下的solr文件夹复制到TongWeb6.0in下


  d、点击TongWeb6.0instartserver.bat运行TongWeb,在命令框中会出现缺少class的错误。这时候操作下一步。


  e、将solr1solr-4.7.2dist文件下的有关solr的jar包复制到TongWeb6.0lib目录

原文地址:https://www.cnblogs.com/taleche/p/7262801.html