启动Tomcat,会报错,这步只是为了将solr-4.9.0.war解压,所以手动解压放在webapp目录下面也是可行的。
步骤四:
方法一:
打开webapps\solr\WEB-INF\web.xml
找到:
这里是需要配置solr/home,只需要修改/put/your/solr/home/here
这个目录可以自定义,建议就用步骤一解压的目录,这里需要非常注意:在Solr官网的Tutorial里面有如下一段话:
How Solr Works with Tomcat
The two basic steps for running Solr in any Web application container are as follows:
Make the Solr classes available to the container. In many cases, the Solr Web application archive (WAR) file can be placed into a special directory of the application container. In the case of Tomcat, you need to place the Solr WAR file in Tomcat's webapps directory. If you installed Tomcat with Solr, take a look in tomcat/webapps:you'll see the solr.war file is already there.
Point Solr to the Solr home directory that contains conf/solrconfig.xml and conf/schema.xml. There are a few ways to get this done. One of the best is to define the solr.solr.home Java system property. With Tomcat, the best way to do this is via a shell environment variable, JAVA_OPTS. Tomcat puts the value of this variable on the command line upon startup
盖楼回复 X
(您的评论需要经过审核才能显示)