Installation Guide to Set Up Solr 4 With Apache Tomcat On Windows
-
Download and install Java SDK (I installed jdk-7u45-windows-x64.exe).
-
Download and install Apache Tomcat (I installed apache-tomcat-8.0.0-RC5.exe). Usually, Tomcat is installed on port 8983 (but this is optional- you can specify your own port).
-
Test the Tomcat server in your browser. You should see the following screen:
-
You can configure the Tomcat server by going to Windows > Start > Monitor Tomcat
-
Stop the Tomcat server by going to Windows > Start > Monitor Tomcat > General Tab> Stop
-
Download Solr-4.6.0 and unzip it in your local directory i.e. C:\ Solr-4.6.0 (download zip file).
-
Go to downloaded Solr folder above (step 6) and Copy solr.war file to Apache webapps folder. I.e. Copy C:\solr-4.6.0\dist\solr-4.6.0.war file to C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps folder (rename solr-4.6.0.war to solr.war).
-
Create an empty Solr home folder. i.e. C:\solr
-
Go to downloaded Solr folder above (step 6). Copy all files from C:\solr-4.6.0\solr-4.6.0\example\solr folder to C:\solr (Solr home folder). This will be your Solr home folder.
-
Look into C:\solr and you will see two folders with name collection1 and bin.
-
Copy the jars from C:\solr-4.6.0\example\lib\ext (all jars) into C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib (this is your Tomcat server main library directory).
-
Set the Java system property
solr.solr.home
to your Solr Home. Go to Windows > Start > Monitor Tomcat > Java Tab > Java Options. Enter the following entry at the end (see below screenshot): -Dsolr.solr.home=c:\solr -
Restart Tomcat by going to Windows > Start > Monitor Tomcat > General Tab > Start
-
Test Solr by going to http://localhost:8983/solr/ in your browser. You should see the Solr admin page below.