Document the SOLR environment Setup, based on SOLR 4.6.0.
First, configure Tomcat
Download Tomcat 7.0. Create a new SOLR folder and unzip the tomcat to the SOLR directory:
-zxvf apache-tomcat-7.0.69.
To start Tomcat:
start
Access the 8080 port test.
Ii. Configuration of SOLR
solr:http://archive.apache.org/dist/lucene/solr/
Unzip the solr-4.6.0 to the SOLR folder:
unzip solr-4.6.0.zip
To create a new Solrhome folder:
mkdir SolrHome
Copy Solr.war to Tomcat's WebApp directory:
cp solr-4.6.0/example/webapps/solr.war apache-tomcat-7.0.69/webapps/solr.war
Copy all files under the solr-4.6.0/example/solr/directory to the Solrhome folder:
-a solr-4.6.0/example/solr/* SolrHome/
Add the Solr.xml file under Tomcat's Conf/catalina/localhost:
<?xml version= "1.0" encoding= "UTF-8" standalone= "yes"?> <Context docBase="/users/yaopan/documents/solr/apache-tomcat-7.0.69/webapps/ Solr.war " Debug=" 0 " crosscontext=" true " > <environment name="Solr/home" type="java.lang.String" Value="/users/yaopan/documents/solr/solrhome" override="true" /> </Context>
Copy the jar package and configuration file to the project directory:
cp solr-4.6.0/example/lib/ext/* apache-tomcat-7.0.69/webapps/solr/WEB-INF/cp solr-4.6.0/example/resources/log4j.properties apache-tomcat-7.0.69/lib/
Restart Tomcat.
Visit: http://localhost:8080/solr/
Successful interface:
SOLR Environment Building