Posted on 2012-12-03 16:50
小胡子 阅读(571)
评论(0) 编辑 收藏 所属分类:
Solr
先从网址
http://labs.mop.com/apache-mirror/lucene/solr/3.6.1/apache-solr-3.6.1.zip 下载程序文件
1.解压开找到apache-solr-3.6.1\apache-solr-3.6.1\dist目录下的apache-solr-3.6.1.war
直接放到tomcat/webapps下面
2.先别急着启动慢慢来,修改配置文件apache-solr-3.6.1\WEB-INF\web.xml
找到:
<!-- People who want to hardcode their "Solr Home" directly into the
WAR File can set the JNDI property here...
-->
<!--
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/put/your/solr/home/here</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
-->
更改这为
<!-- People who want to hardcode their "Solr Home" directly into the
WAR File can set the JNDI property here...
-->
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>d:/solr_work/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
注:红色字体的文件夹为apache-solr-3.6.1\example\solr 该应用(此为单核应用,多核以后会讲到)放大D盘的新建空目录solr_work目录下就可以
3.启动tomcat,输入
http://localhost:8080/solr solr应用搭建成功
原文出自:
http://insolr.com/forum.php?mod=viewthread&tid=3&reltid=880&pre_thread_id=19&pre_pos=6&ext=