Solr 1.3 Installation & Configuration Guide

This guide is for initial installation only.

See also

top

Requirements

Java 1.5 or greater.
A java servlet container,such as Tomcat 5.5.x

top

SOLR installation

Begin by unziping the Solr release and copying dist/apache-solr-1.2.0.war to the webapps directory like /opt/apache-solr-1.2.0/dist/

top

TOMCAT Configuration

server.xml
configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8. Edit Tomcat's conf/server.xml and add the following attribute to the correct Connector element: URIEncoding="UTF-8".
<Connector port="8983" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
solr.xml
Tomcat context fragments make configuring multiple Solr webapps (with JNDI) in a single Tomcat server easy.
Just put a context fragment file under $CATALINA_HOME/conf/Catalina/localhost that looks something like this...

<Context docBase="/opt/apache-solr-1.2.0/dist/apache-solr-1.2.0.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="/web/solr" override="true" />
</Context>
top

SOLR configuration

setup SOLR Home
copy the example solr home example/solr as a template for your solr home,including example/solr/bin and example/solr/conf。
copy {$NPS_HOME}/solr/solr.xml to your solr home
copy {$NPS_HOME}/solr/npscore to your solr home
setup paoding
1.copy {$NPS_HOME}/solr/lib/*.jar to {$TOMCAT}/common/lib/
2.copy {$NPS_HOME}/solr/dic/ to your solr home
3.Set the PAODING_DIC_HOME environment variable to {$SOLR_HOME}/dic in OS or catalina.sh
windows:set PAODING_DIC_HOME=c:/web/solr/dic
unix:export PAODING_DIC_HOME=/web/solr/dic
setup NPS
Edit nps.conf at NPS server,set the corrent SOLR_URL path.for example SOLR_URL=http://192.168.1.2:8983/solr