Monday, August 16, 2010

Install solr in windows tomcat

1. download solr like apache-solr-1.4.1
2. download tomcat 5.5 or above
3. Install tomcat
4. Extract apache-solr-1.4.1 package to anywhere
5. Copy apache-solr-1.4.1\dist\apache-solr-1.4.1.war to Tomcat webapps folder, for instance: Tomcat 5.5\webapps
6. Start tomcat and get: Tomcat 5.5\webapps\apache-solr-1.4.1 directory
7. Stop tomcat, open Tomcat 5.5\webapps\solr\WEB-INF\web.xml and copy below

<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>C:\solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>

to replace the old.
8. Zip apache-solr-1.4.1 and rename to solr.zip
9. Delete Tomcat 5.5\webapps\apache-solr-1.4.1 directory
10. Copy apache-solr-1.4.1\example\solr folder to c:
11. restart tomcat

That's it.

No comments: