solr(一)部署
前提jdk1.7和tomcat7
直接解压缩solr4.8.1至目录/usr/local/,重命名为solr;然后复制solr/dist/solr-4.8.1.war到tomcat6/webapps中;然后修改tomcat6/conf/server.xml
<Host name="localhost" appBase="/usr/local/tomcat/webapps"
unpackWARs="true" autoDeploy="true">
unpackWARs="true" autoDeploy="true">
如图将webapps改为/usr/local/tomcat/webapps 即可;
(4)启动tomcat,solr.war自动解压,然后修改solr项目下的web.xml
进入bin目录:./startup.sh启动tomcat
修改solr home配置(注意:要把这段内容的注释去掉,否则不生效):
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/usr/local/solr/example/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/usr/local/solr/example/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
(5)复制solr/example/lib/ext下的jar包到tomcat/webapps/solr/WEB-INF/lib
cp /usr/local/solr/example/lib/ext/*.jar /usr/local/tomcat6/webapps/solr/WEB-INF/lib/
(6)在tomcat solr下创建classpath,并把example/resources/log4j.properties复制到classpath中
cp/usr/local/solr/example/resources/log4j.properties /usr/local/tomcat/webapps/solr/classpath/
(7)配置完成重启tomcat
./shutdown.sh
./startup.sh
(8)测试
打开浏览器输入:http://192.168.0.9:8080/solr进入sor admin画面
相关推荐
pigsmall 2020-11-19
SXIAOYI 2020-09-16
linuxprobe0 2013-04-01
83560193 2013-06-25
kidneybeans 2013-06-17
加菲猫园 2013-06-16
年轻就要对味 2014-07-11
稻草人的高粱地 2014-07-02
smilebestSun 2014-06-12
xusong 2014-05-17
zfszhangyuan 2013-09-12
80183053 2013-09-12
gaozhlzh 2013-09-11
87453169 2014-01-17
Tom天天 2013-07-12
etnahh 2014-07-11
向日葵Solros 2014-07-11
向日葵Solros 2014-07-10