Apache Solr Documentation

4.7 Ref Guide (PDF Download)
Solr Tutorial
Solr Community Wiki

Older Versions of this Guide (PDF)

4.8 Draft Ref Guide Topics


This Unreleased Guide Will Cover Apache Solr 4.8

Skip to end of metadata
Go to start of metadata

This section describes how to install Solr. You can install Solr anywhere that a suitable Java Runtime Environment (JRE) is available, as detailed below. Currently this includes Linux, OS X, and Microsoft Windows. The instructions in this section should work for any platform, with a few exceptions for Windows as noted.

Got Java?

You will need the Java Runtime Environment (JRE) version 1.7 or higher. At a command line, check your Java version like this:

The output will vary, but you need to make sure you have version 1.7 or higher. If you don't have the required version, or if the java command is not found, download and install the latest version from Oracle at http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Installing Solr

Solr is available from the Solr website at http://lucene.apache.org/solr/.

For Linux/Unix/OSX systems, download the .tgz file. For Microsoft Windows systems, download the .zip file.

Solr runs inside a Java servlet container such as Tomcat, Jetty, or Resin. The Solr distribution includes a working demonstration server in the Example directory that runs in Jetty. You can use the example server as a template for your own installation, whether or not you are using Jetty as your servlet container. For more information about the demonstration server, see the Solr Tutorial.


Solr ships with a working Jetty server, with optimized settings for Solr, inside the example directory. It is recommended that you use the provided Jetty server for optimal performance. If you absolutely must use a different servlet container then continue to the next section on how to install Solr.

To install Solr

  1. Unpack the Solr distribution to your desired location.
  2. Stop your Java servlet container.
  3. Copy the solr.war file from the Solr distribution to the webapps directory of your servlet container. Do not change the name of this file: it must be named solr.war.
  4. Copy the Solr Home directory solr-4.x.0/example/solr/ from the distribution to your desired Solr Home location.
  5. Start your servlet container, passing to it the location of your Solr Home in one of these ways:
    • Set the Java system property solr.solr.home to your Solr Home. (for example, using the example jetty setup: java -Dsolr.solr.home=/some/dir -jar start.jar).
    • Configure the servlet container so that a JNDI lookup of java:comp/env/solr/home by the Solr webapp will point to your Solr Home.
    • Start the servlet container in the directory containing ./solr: the default Solr Home is solr under the JVM's current working directory ($CWD/solr).

To confirm your installation, go to the Solr Admin page at http://localhost:8983/solr/ . Note that your servlet container may have started on a different port: check the documentation for your servlet container to troubleshoot that issue. Also note that if that port is already in use, Solr will not start. In that case, shut down the servlet container running on that port, or change your Solr port.

For more information about installing and running Solr on different Java servlet containers, see the SolrInstall page on the Solr Wiki.

Related Topics

  • No labels