Multicore SOLR and Tomcat On Windows Server 2008 R2

by dcurtis 4/4/2011 7:20:00 AM

Instructions for installing a multicore instance of SOLR plus Tomcat on Windows Server 2008 R2 were not clear anywhere.  I finally got everything to work by piecing together bits and pieces from various sites to get everything running.  The following are the steps I performed:

  1. Downloaded and installed the 32-bit/64-bit Windows Service Installer for Tomcat
  2. Installed Tomcat on the server (no special instructions here--just run the install and install wherever you wish)
  3. Verified the installation of Tomcat by going to http://localhost:8080
  4. Edit Tomcat's conf/server.xml and add URIEncoding="UTF-8" to the <Connector> element as shown here
  5. Download SOLR from one of the mirrors found here (downloaded the package) and unzip the package
  6. Create a directory where SOLR will be hosted from (in my case I used e:\inetpub\solr)
  7. Copy the contents of the example\solr directory to your SOLR host directory (in my case e:\inetpub\solr)
  8. Create directories under your SOLR host directory for each of the cores you wish to create (I created a dozen or so folders for each core I wanted to create in the e:\inetpub\solr directory.  The directories included en-US, en-CA, en-GB, etc.)
  9. Copy the solr.xml file from the example\multicore directory and paste it into your SOLR host directory (e:\inetpub\solr for my example)
  10. Edit the solr.xml file to include the information for each of the cores you created (if you created a folder under your host for a core named en-US, then add the following under the <cores> element in the solr.xml file: <core name="en-US" instanceDir="en-US" />)
  11. Stop the Tomcat Service
  12. Copy the *solr*.war file from the dist directory in the unzipped SOLR package to your Tomcat webapps folder
  13. Rename the *solr*.war file to solr.war
  14. In the notification area in the right-hand side of the Windows task bar, right-click on the Apache Tomcat 7 icon and select Configure
  15. Click the Java tab and add the following to the Java Options text box: -Dsolr.solr.home=e:\inetpub\solr (change e:\inetpub\solr to wherever your SOLR is being hosted)
  16. Click OK in the dialog and then start-up the Tomcat service
  17. Open the conf\solrconfig.xml files under each of the cores you created and change the dataDir element to point to a specific directory.  If this step is not completed, all of your cores will be using the same data store for their data.
  18. Stop and re-start the Tomcat Service
  19. Test that your cores are running by running a query from the web browser http://localhost:8080/solr/en-US/select?q=*:* (replace "en-US" with whatever you've named one of your cores)

If I get a chance, I will update the instructions and add some illustrations to make it a bit easier to follow


I added steps 17 and 18 to my original post--if you skip this step, all of the cores will be using the same datastore and therefore overwrite each other.  Sorry I missed that the first time!

Currently rated 3.4 by 23 people

  • Currently 3.391305/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,


Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Derek Curtis Derek Curtis
President, Plaid Pony Technology Solutions LLC

E-mail me Send mail


<<  June 2018  >>

View posts in large calendar


    Recent comments



    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2018

    Sign in