Previous Topic: Set up and Configure Node 1Next Topic: Configure Liferay to use Solr for Searching


Install and Configure Apache Solr

Install Apache Solr on the CA Open Space common server.

Follow these steps:

  1. Download Solr 1.4.1 on the CA Open Space common server. For more information, see any Solr website, example, http://archive.apache.org/dist/lucene/solr/1.4.1.
  2. From the Solr distribution, copy example folder so that CA Open Space is also at the same level.
  3. Define the environment variable as the location for Solr to store the search index.

    Example: $SOLR_HOME=/openspace/solr

    Note: This environment variable can be defined on the start up sequence of the operating system, in the environment for the user who is logged in, or in the start-up script for your application server. If you are using Tomcat to host Solr, modify setenv.sh or setenv.bat and add the environment variable there.

  4. Use this environment variable as a parameter for JVM during the start up configuration of the application server.

    Note: If you are using Tomcat, edit catalina.sh or catalina.bat and add the -Dsolr.solr.home=$SOLR_HOME to the $JAVA_OPTS variable.

  5. Install Solr on the CA Open Space common server. For more information, see http://lucene.apache.org/solr.

    Note: Install the Solr search engine on a separate machine from Liferay. To integrate Solr search engine with Liferay, restart the application server.

  6. Shut down Solr.
  7. From the Solr distribution, copy solr.war to the webapps directory of your servlet container.
  8. Start Solr on the Jetty server:
    1. Go to $SOLR_HOME on the command prompt.
    2. Run java -Dsolr.solr.home=/openspace/solr -jar start.jar to set the java system property solr.solr.home.