`
GhostWolf
  • 浏览: 308389 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

solr安装

阅读更多

抽空学了一下solr,走了不少弯路,刚开始用resin3+solr4.9,web.xml一直报错,metadata-complete="true"属性不存在,因为需要升级resin版本,折腾,最后才发现其实在resin3下面只要删除这个属性其实也是可以运行的。

 

以下为简单的安装步骤:

1.复制solr-4.9.0\example\webapps\solr.war,放到服务器上/home/resin/data/jsp/solr/WebRoot(路径自己定义),并解压

2.复制solr-4.9.0\example\solr下面所有文件,放到服务器上/home/resin/data/jsp/solr/WebRoot/cores/single(路径自己定义)

3.配置resin host

4.修改web.xml,把<env-entry></env-entry>标签的注释去除,修改为自己的路径

            <env-entry>

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

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

                  <env-entry-value>/home/resin/data/jsp/solr/WebRoot/cores/single</env-entry-value>

            </env-entry>

注意这里不修改,会报/solr/collection1/solrconfig.xml was not found on this server

 

至此安装算是完成

 

------------------------------------------------------------------------------------------------------------------------

以上为单实例,如果需要配置多实例,可以这样配置

1.新建目录/home/resin/data/jsp/solr/WebRoot/cores/multicore(路径自己定义)

2.把solr-4.9.0中\example\multicore目录下的文件复制到multicore中

3.修改web.xml,/home/resin/data/jsp/solr/WebRoot/cores/single修改为/home/resin/data/jsp/solr/WebRoot/cores/multicore

 

如果你想通过后台去新建个实例,需要这样配置

1.在/home/resin/data/jsp/solr/WebRoot/cores/multicore目录中新建立new_core文件夹(名字自己定义)

2.在new_core中新建conf 和data这两个文件夹

3.在conf文件夹中放入schema.xml、solrconfig.xml 这两个文件(可以从core0\conf中复制过来

4.修改/home/resin/data/jsp/solr/WebRoot/cores/multicore/solr.xml文件,<cores></cores>中新增<core name="new_core" instanceDir="new_core" />,注意new_core的名字要和第1步新建的文件夹new_core名字要一致


 

参考链接:

http://blog.csdn.net/cymlancy/article/details/10504491

http://blog.csdn.net/escaflone/article/details/5726774

  • 大小: 59 KB
  • 大小: 33.5 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics