tomcat7.42 solr-4.50 ik 整合
1.下载tomcatsolrcd/app/download
wgethttp://mirrors.cnnic.cn/apache/lucene/solr/4.5.0/solr-4.5.0.zip
wgethttp://apache.dataguru.cn/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz
2.解压tomcatsolr
tarzxfache-tomcat-7.0.42.tar.gz
unzipsolr-4.5.0.zip
mvsolr-4.5.0/app/solr
3.部署Tomcat
cp-rapache-tomcat-7.0.40/*/app/tomcat_solr/
4.修改tomcat的server.xml配置文件,让其支持中文.
5.解压缩solr.war至/app/tomcat_solr/webapps下
unzip/app/solr/example/webapps/solr.war-d/app/tomcat_solr/webapps/solr
6..拷贝/app/solr/example/lib/ext/下所有jar包至/app/tomcat_solr/webapps/solr/WEB-INF/lib/下,
将/app/solr/example/resources/log4j.properties拷贝到/app/tomcat_solr/lib下
cp/app/solr/example/lib/ext/*/app/tomcat_solr/webapps/solr/WEB-INF/lib/
cp/app/solr/example/resources/log4j.properties/app/tomcat_solr/lib/
7.修改solr下的web.xml,配置solrhome
vim/app/tomcat_solr/webapps/solr/WEB-INF/web.xml
solr/home
/app/solr/example/solr
java.lang.String
8.注意你的solrhome配置为另一个新的目录。需要修改collection1/conf/solrconfig.xml文件,让其找到相应的文件。
vim/app/tomcat_solr/webapps/solr/collection1/conf/solrconfig.xml
9.设置ik的中文分词
解压IKAnalyzer2012FF_hf1.zip,获得IKAnalyzer2012FF_hf1.将该目录下的IKAnalyzer.cfg.xml,IKAnalyzer2012FF_u1.jar,stopword.dic
放到之前安装TOMCAT_HOME/webapps/solr/WEB-INF/lib/目录下
修改vim/app/solr/example/solr/collection1/conf/schema.xml,在中增加如下内容:
10.进入tomcat下的bin目录
shstartup.sh
页:
[1]