DC 5.1.0 4.5.1 Installation of Solr Search

  1. Make sure you have Java Runtime installed according to this: http://lucene.apache.org/solr/4_10_3/SYSTEM_REQUIREMENTS.html. Unless you know specifically otherwise choose the latest version of the 64-bit Java RTE from http://www.java.com.
  2. Download the Solr installation zip file from the Solr homepage:

Now that you have Java Runtime installed and you have downloaded the Solr zip file, it's time to move on to the next steps:

  1. Choose an installation folder (e.g. C:\Solr) and make sure you have write access. In this guide, the folder will be referred to as SOLR_MAIN_DIR. There is no installer so simply unzip the contents of the archive here (specifically the contents of the solr-4.10.3 folder within the archive). You should now have 6 folders within SOLR_MAIN_DIR (bin, contrib, dist, …) and some text files.
  2. Optional: Make sure Solr will start. Open the command prompt and navigate to SOLR_MAIN_DIR/example using the cd command. Then start the server using this command:
    1. Java –jar start.jar
    2. Check that Solr is accessible at:
      http://localhost:8983/solr/
    3. Exit the command prompt with ctrl + C.
  3. Create a subfolder to SOLR_MAIN_DIR where your Solr configuration and Jetty will live (e.g. C:\Solr\SolrService). This folder will be referred to as SOLR_SERVICE_DIR. This folder is the one that needs to be shared and have its UNC path set in DAM config SOLR_UNC.
  4. Copy the contents of SOLR_MAIN_DIR\example\solr to SOLR_SERVICE_DIR – except the folder "collection1" which is an example core.
  5. Create a subfolder to SOLR_SERVICE_DIR called jetty.
  6. Copy the following folders and files into the jetty subfolder from SOLR_MAIN_DIR\example:
    1. contexts
    2. etc
    3. lib
    4. logs
    5. resources
    6. webapps
    7. start.jar
  7. Optional: Make sure Solr will start. Open the command prompt and navigate to SOLR_SERVICE_DIR\jetty using the cd command. Then start the server using this command:
    1. Java -Dsolr.solr.home=.. -jar start.jar
    2. Check that Solr is accessible at:
      http://localhost:8983/solr/
    3. Exit the command prompt with ctrl + c.
  8. Download Apache Commons' Daemon package for Windows (make sure to get the Windows package that includes .exe files).
  9. When installing Solr on 64-bit Windows you need the prunserv.exe from the amd64 folder. Copy this file to SOLR_SERVICE_DIR\jetty and rename it to SolrService.exe – this is the actual Windows service executable.
  10. Copy prunmgr.exe into a new subfolder SOLR_SERVICE_DIR\jetty\serviceui and rename it also to SolrService.exe (to provide default service name) – this is the UI that allows to correct some of the parameters of the service after it had been setup via the command line.
  11. Make sure the computers environment variables have JAVA_HOME definer for system variables (not just user). Run sysdm.cpl as administrator and go to advanced tab. The variable value should look something like C:\Progra~1\Java\jresomeversion. Otherwise, attempting to start the service will produce the following message in the commons-daemon log: Unable to find Java Runtime environment.
  12. Run the service registration from SOLR_SERVICE_DIR\jetty as the administrator on the command prompt after replacing SOLR_SERVICE_DIR with the actual path and setting Xms and Xmx options to relevant values (or leaving them out). A rule of thumb is max ram reserved should be half the servers available RAM but this all depends on the server. The command should be all on a single line:
    1. SolrService.exe //IS//SolrService --DisplayName="Solr Service" --Install=SOLR_SERVICE_DIR\jetty\SolrService.exe --LogPath=SOLR_SERVICE_DIR\jetty\logs --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=java --StopMode=java --Jvm=auto ++JvmOptions=-Djetty.home=SOLR_SERVICE_DIR\jetty ++JvmOptions=-DSTOP.PORT=8087 ++JvmOptions=-DSTOP.KEY=stopsolr ++JvmOptions=-Djetty.logs=SOLR_SERVICE_DIR\jetty\logs ++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true ++JvmOptions=-Xms768M ++JvmOptions=-Xmx8000M --Classpath=SOLR_SERVICE_DIR\jetty\start.jar --StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTION=ALL ++StartParams=SOLR_SERVICE_DIR\jetty\etc\jetty.xml --StopClass=org.eclipse.jetty.start.Main ++StopParams=--stop ++JvmOptions=-Dsolr.solr.home=SOLR_SERVICE_DIR --StartPath=SOLR_SERVICE_DIR\jetty


    2. Optional: save the command as "installSolrService.cmd" so it can be easily edited and reinstalled with changed parameters later.

    3. Info: the service can be uninstalled from the same command prompt with the command "sc delete SolrService".

  13. Run the service:

    1. Start it from the Services control panel or SolrService.exe start from command prompt.
    2. Check the log files in the log subfolder, specifically commons-daemon.<date>.log for messages.
    3. If there is an error message, run serviceui\SolrService.exe and try to correct possible problems. An account that runs the service may need to switch to one with full access to the folders (e.g. administrator).
    4. If the service stays in "starting" mode it is either misconfigured, JAVA_HOME is not set or you trying to run it with a 32-bit java. You have to kill the process manually.
    5. The success criteria here is being able to access Solr Web Admin UI from http://localhost:8983/solr
  14. In the Services control panel, change status of Solr Service from manual to automatic to ensures it runs after a restart. Try stopping and starting the service to test that it works.

1.1 Directory structure

The final folder structure should look like this:

  • Solr (SOLR_MAIN_DIR)
    • bin
    • contrib
    • dist
    • docs
    • example
    • licenses
    • SolrService (SOLR_SERVICE_DIR)
      • bin
      • jetty
        • contexts
        • etc
        • lib
        • logs
        • resources
        • serviceui
        • solr-webapp
        • webapps
      • customer1_### (not at first but after a DAM has successfully enabled a Solr search)
      • Other solr cores ..