Installing Apache Solr indexing engine in Windows environment can be a bit tricky. Here are some instructions that I use for clean install, this ensures separate installation of Tomcat and Solr allowing you to restart/Stop Solr if required without fiddling around with Tomcat. One needs to be logged in as an administrator to follow these steps
Step 1: Install JDK
Install JDK if you dont have it installed already. Download the windows x64 version from here
Step 2 : Install Tomcat
Download the core 32-bit/64-bit Windows Service Installer from here. While installing allow the service to start automatically. Once installed you can verify the installation by loading the default site at http://localhost:8080/ If the page loads up fine you can safely assume Tomcat is running fine
Step 3: Download Solr
I got the latest version from here. You may be redirected to Download Mirrors index page from where you can select a mirror location to download. Unzip,browse to /example and copy the folders etc, lib, logs, webapps and the file start.jar to the /example/solr folder. Now copy the /example/solr folder to c:\
Step 4: Setup Solr as Service
Solr files are now ready to work. However we need install Solr as a service so it works seamlessly. I use NSSM to install and monitor this service. It is a pretty light weight application and logs into the event viewer as well. Download it from here. Once downloaded copy it to c:\solr folder. Go to command prompt(as administrator), change directory to c:\solr and run the command “nssm install solr”. For ‘Path’ select the location of java.exe normally is c:\windows\system32\java.exe ‘Start in’ field can be left empty and against ‘options’ paste the following
-Dsolr.solr.home=C:/solr/ -Djetty.home=C:/solr/ -Djetty.logs=C:/solr/logs/ -cp C:/solr/lib/*.jar;C:/solr/start.jar -jar C:/solr/start.jar
Step 5: Start Solr Service
To start the solr service, run command “net start solr”. That should get solr started and the interface should be accessible as well at http://localhost:8983/solr
(Solr service can be stopped using “net stop solr”. You may need to stop it in case of major configuration changes)
That’s it, Solr is all set to work using Apache Tomcat in windows environment. For more information on configuring Solr to access Ms. SQL Server or Sql Server Express check this post