Original article: http://blog.csdn.net/michzel/article/details/6219903
Run SOLR example on Windows
1. Download the compressed package apache-solr-1.2.0.zip and decompress it.
2. Rename/apache-solr-1.2.0/Dist/apache-solr-1.2.0.war to SOLR. War and copy it to Tomcat's webapps
3. Create the SOLR home directory
SOLR requires a home directory to store data, create a folder F:/SOLR, copy all files under the apache-solr-1.2.0/example/SOLR folder to F:/SOLR
4. Set the SOLR home directory
Method 1: Use the JVM system variable java_opts = "$ java_opts-dsolr. SOLR. Home = F:/SOLR"
Method 2: Use Tomcat's JNDI
Create an Apache-Tomcat-6.0.16/CONF/Catalina/localhost/SOLR. xml file with the following content:
<Context docbase = "F:/Apache-Tomcat-6.0.16/Apache-Tomcat-6.0.16/webapps/SOLR" DEBUG = "0" crosscontext = "true">
<Environment name = "SOLR/home" type = "Java. Lang. String" value = "F:/SOLR" override = "true"/>
</Context>
5. Run Tomcat and browse http: // 127.0.0.1: 8080/SOLR/admin/