Mike Robbins

Sitecore Developer Blog

Follow me on GitHub

Install Solr as Windows Service for Sitecore Content Search

To install Solr as a Windows service.

  1. Download and setup Solr for Sitecore.
    Great tutorial from Dan Solovay on this
  2. Download Non Sucking Service Manager from http://nssm.cc/download
  3. Copy the nssm.exe into your solr directory.

    [caption id="attachment_292" href="https://mikerobbinssitecore.files.wordpress.com/2014/11/nssm1.png">NSSM NSSM

  4. Create a bat file within the Solr/example folder. Example below, where CD is your example folder within your Solr directory.
    @echo off
    cd "C:\solr\example\"
    java -Xms64M -Xmx256M -jar start.jar
  5. Run Command Prompt as Admin. CD to the directory containing of your NSSM.exe
  6. Run the following script to install Solr as a service."nssm install YourDesiredServiceName" "c:/Solr/LocationOfBatScript""E.g. nssm install MikeRobbinsSolr "C:\solr\example\Solr.bat"

    [caption id="attachment_289" href="https://mikerobbinssitecore.files.wordpress.com/2014/11/solrserviceinstalled.png">Solr Service Installed Solr Service Installed

  7. Start the service from the services snap in

    [caption id="attachment_290" href="https://mikerobbinssitecore.files.wordpress.com/2014/11/services.png">Solr Services Solr Services