

solr/data relative to the current directory - which is true for running the Jetty server provided with the example, but incorrect for Tomcat running as a service.

The configuration file $SOLR_HOME/conf/solrconfig.xml in the example sets dataDir for the index to be. war file dist/apache-solr-*.war into $SOLR_HOME as solr.war.

Installing Solr instances under TomcatĪssuming that Solr and its example are built, this is how to install the Solr example as an instance under Tomcat.Ĭopy the example/solr directory from the source to the installation directory like /opt/solr/example/solr, herafter $SOLR_HOME. Change to the 'example' directory, run java -jar start.jar and visit localhost:8983/solr/admin to test that the example works with the Jetty container. Build the example for the Solr tutorial by running ant example. In the source directory, run ant dist to build the. Assumes that you have JDK 1.6 already installed. These instructions are for building Solr from source, if you have a nightly tarball or have checked out the trunk from subversion at. Skip this section if you have a binary distribution of Solr. Use chkconfig to enable the tomcat6 service to start on boot. The startup script tomcat6 can be placed in /etc/init.d/tomcat6 on CentOS/RedHat/Fedora so that you can start Tomcat using service tomcat6 start. Tomcat runs on the port defined $CATALINA_HOME/conf/server.xml, configured by default to port 8080. Start Tomcat with $CATALINA_HOME/bin/catalina.sh run. As solr, extract the Tomcat 6.0 download into /opt/tomcat6, hereafter referred to as the $CATALINA_HOME directory.Įdit $CATALINA_HOME/conf/tomcat-users.xml to enable the manager login as user "tomcat" with password "tomcat" (insecure): These are instructions for manually installing Tomcat 6 on Linux, recommended because distribution Tomcats are either old or quirky.Ĭreate the solr user. The log4j.properties file from the resources file (something like /opt/solr/example/resources) must be copied to $CATALINA_HOME/lib/Īpache Tomcat is a web application server for Java servlets.The JAR files from the Solr lib/ext directory (something like /opt/solr/example/lib/ext) must be copied to $CATALINA_HOME/lib/.These steps are required for both Linux and Windows.

Though this page needs to be completely re-written for the latest Solr version, here are the main differences with Solr 4.3 (at least for running a single instance). These instructions are not current and are for an indeterminate version of Solr. Solr4.3 requires completely different deployment.
