This post assumes a fresh windows installation (no other software installed).
There are three things to download:
1) J2SE (Java 2 Standard Edition JRE) (click the "Download JRE" button)
2) Apache Tomcat 6 (under "Binary Distributions" click "32-bit/64-bit Windows Service Installer")
3) SOLR (Click on the "Suggested Mirror" link, select the folder for the most recent version, then download the .zip file)
4) Install J2SE.
This is a no-brainer.
This is a no-brainer.
5) Install Tomcat.
Using the MSI installer file, this is very straightforward.
Using the MSI installer file, this is very straightforward.
Notes:
- When you start the installer, check in ALL the boxes for the different components to install. (if you don't want them you can remove the manually later)
- Since you installed J2SE first, the path to the JRE will be pre-populated in one of the installer's dialogs. If it NOT pre-populated, simply find the JRE ("C:\Program Files\Java\jre6" on my machine) and copy/paste its path into the Tomcat installer dialog's field.
- I left the Tomcat username/password fields blank. This isn't an issue if you have your firewall setup correctly (outside the scope of this document).
- At the end of the installation, CHECK the option to start Tomcat when finished.
- At the end of the installation, CHECK the option to start Tomcat when finished.
6) Install SOLR.
When I create a new development project (in Visual Studio for example), I keep all associated files/tools/applications in the project's folder, so in my case I extracted the SOLR folder to my project's folder. In case you didn't realize.. extracting SOLR --is-- the installation. .. now for the configuration.
When I create a new development project (in Visual Studio for example), I keep all associated files/tools/applications in the project's folder, so in my case I extracted the SOLR folder to my project's folder. In case you didn't realize.. extracting SOLR --is-- the installation. .. now for the configuration.
7) Copy "solr.war" (or similarly named file which may contain version numbers)
from the extracted path:
"...\apache-solr-1.4.1\dist\solr.war"
to
"C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\"
or the equivalent path on your machine.
If Tomcat is running (which, if you followed this guide exactly, it should be), you will see another folder appear in "webapps" called "solr" after a few seconds.
8) Add SOLR to Tomcat.
When you installed tomcat, you chose to install all components including a handy little Tomcat Monitoring tool located in your system tray.
When you installed tomcat, you chose to install all components including a handy little Tomcat Monitoring tool located in your system tray.
Double click this icon and go to the "Java" tab.
Under "Java Options" add the following line:
"-Dsolr.solr.home=.../solr/"
where ... is the path to your extracted SOLR "installation". Note that this folder is the one that contains the directories "bin" and "conf".
9) Restart Tomcat service.
Now, Click the "General" tab
- Change "Startup type" to "automatic" (tomcat will start with your computer, if you don't choose this, you will need to manually start it each time your system starts).
- Click "stop"
- Click "start"
Note: This can also be done in service.msc (start -> run-> "service.msc", press enter).
This will restart the Tomcat Service running on your machine.
10) Verifying configuration.
Now, navigate to http://localhost:8080/solr/
If you see a "Welcome to SOLR!" message, then everything worked. If you get an error page (gray background with white text) then look at the first few lines and try to figure it out. In my experience, the most likely problem is that you got one of the paths wrong (particularly the "-Dsolr.solr.home=.../solr/" path).
Note that after you change any of the paths, or move files around, you need to restart Tomcat (can do it as demonstrated above)
Leave comments/corrections/useful suggestions below!
Thanks!
9) Restart Tomcat service.
Now, Click the "General" tab
- Change "Startup type" to "automatic" (tomcat will start with your computer, if you don't choose this, you will need to manually start it each time your system starts).
- Click "stop"
- Click "start"
Note: This can also be done in service.msc (start -> run-> "service.msc", press enter).
This will restart the Tomcat Service running on your machine.
10) Verifying configuration.
Now, navigate to http://localhost:8080/solr/
If you see a "Welcome to SOLR!" message, then everything worked. If you get an error page (gray background with white text) then look at the first few lines and try to figure it out. In my experience, the most likely problem is that you got one of the paths wrong (particularly the "-Dsolr.solr.home=.../solr/" path).
Note that after you change any of the paths, or move files around, you need to restart Tomcat (can do it as demonstrated above)
Leave comments/corrections/useful suggestions below!
Thanks!

No comments:
Post a Comment