You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by "Steve Rowe (Confluence)" <co...@apache.org> on 2013/10/01 20:16:00 UTC

[CONF] Apache Solr Reference Guide > Installing Solr

Space: Apache Solr Reference Guide (https://cwiki.apache.org/confluence/display/solr)
Page: Installing Solr (https://cwiki.apache.org/confluence/display/solr/Installing+Solr)

Change Comment:
---------------------------------------------------------------------
removed asterisks from "java -version" in a code block, where they are rendered literally

Edited by Steve Rowe:
---------------------------------------------------------------------
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.

h2. Got Java?

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

{code:language=none|borderStyle=solid|borderColor=#666666}
$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 1.6.0_0-b12, mixed mode, sharing)
{code}

The output will vary, but you need to make sure you have version 1.6 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 Sun at [http://java.sun.com/javase/downloads/].

h2. Installing Solr

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

For Linux/Unix/OSX systems, download the {{.gzip}} 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|https://lucene.apache.org/solr/tutorial.html].

{note}
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.
{note}

h3. To install Solr

# Unpack the Solr distribution to your desired location.
\\
\\
# Stop your Java servlet container.
\\
\\
# 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}}.
\\
\\
# Copy the Solr Home directory {{apache-solr-4.x.0/example/solr/}} from the distribution to your desired Solr Home location.
\\
\\
# 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|solr:Overview of the Solr Admin UI]&nbsp;at&nbsp;{{[http://localhost:8983/solr/|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|https://wiki.apache.org/solr/SolrInstall] page on the [Solr Wiki|https://wiki.apache.org/solr/FrontPage].

h2. Related Topics
* [SolrInstall|http://wiki.apache.org/solr/SolrInstall]

{scrollbar}


Stop watching space: https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=solr
Change email notification preferences: https://cwiki.apache.org/confluence/users/editmyemailsettings.action