码迷,mamicode.com
首页 > 其他好文 > 详细

Solr 4.4.0安装

时间:2019-07-26 02:07:02      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:extra   cti   img   复制   com   xmx   -name   linux   archive   

软件包准备

  • JDK

http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin

  • Solr

https://archive.apache.org/dist/lucene/solr/4.4.0/solr-4.4.0.tgz

  • Tomcat

https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.36.tar.gz

 安装路径

软件 安装路径
JDK /usr/java/jdk1.6.0_45
Tomcat /usr/local/apache-tomcat-6.0.36
Solr /usr/local/contentplatform/solr/solr

安装

1. JDK(略)

2.Tomcat(略)

3.Solr

3.1 解压Solr至/usr/local/contentplatform/solr-4.4.0,并将/usr/local/contentplatform/solr-4.4.0/example目录下内容复制到/usr/local/contentplatform/solr目录

$ mkdir /usr/local/contentplatform/solr
$ cp -r /usr/local/contentplatform/solr-4.4.0/example/* /usr/local/contentplatform/solr/

3.2 配置tomcat

3.2.1 catalina.sh

JAVA_HOME=/usr/java/jdk1.6.0_45
JAVA_OPTS="$JAVA_OPTS -Xms2000M -Xmx2000M -Dsolr.solr.home=/usr/local/contentplatform/solr/solr"
echo "Java Options: $JAVA_OPTS"

3.2.2 将/usr/local/contentplatform/solr-4.4.0/example/webapps复制到/usr/local/apache-tomcat-6.0.36/webapps目录

$ cp /usr/local/contentplatform/solr-4.4.0/example/webapps/solr.war /usr/local/apache-tomcat-6.0.36/webapps/

3.3.3 启动tomcat

$ /usr/local/apache-tomcat-6.0.36/bin/catalina.sh start

 3.3.4 修改/usr/local/apache-tomcat-6.0.20/webapps/solr/WEB-INF/web.xml文件

    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/usr/local/contentplatform/solr/solr</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>

 3.3.5 将以下jar文件复制到tomcat目录

$ cp -r /usr/local/contentplatform/solr-4.4.0/dist/*.jar /usr/local/apache-tomcat-6.0.36/webapps/solr/WEB-INF/lib/
$ cp -r /usr/local/contentplatform/solr-4.4.0/contrib/velocity/lib/*.jar /usr/local/apache-tomcat-6.0.36/webapps/solr/WEB-INF/lib/
$ cp -r /usr/local/contentplatform/solr-4.4.0/contrib/extraction/lib/*.jar /usr/local/apache-tomcat-6.0.36/webapps/solr/WEB-INF/lib/
$ cp -r /usr/local/contentplatform/solr-4.4.0/example/lib/*.jar /usr/local/apache-tomcat-6.0.36/webapps/solr/WEB-INF/lib/
$ cp -r /usr/local/contentplatform/solr-4.4.0/example/lib/ext/*.jar /usr/local/apache-tomcat-6.0.36/webapps/solr/WEB-INF/lib/

 3.3.6 重启tomcat

$ /usr/local/apache-tomcat-6.0.20/bin/catalina.sh start
$ /usr/local/apache-tomcat-6.0.20/bin/catalina.sh stop

 

 tomcat访问测试

技术图片

 

Solr 4.4.0安装

标签:extra   cti   img   复制   com   xmx   -name   linux   archive   

原文地址:https://www.cnblogs.com/ilifeilong/p/11247648.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!