Wednesday, 28 September 2011

APACHE SOLR set up for tomcat on linux




Instructions for setting up APACHE SOLR on tomcat. The following are the steps to be performed:

    • Download the Tomcat-5.5.33 from here.
    • Install Tomcat (no special instructions here--just run the install and select directory wherever you wish to install)
    • Start Tomcat by startup.sh in bin dir.
    • Verify the installation of Tomcat by going to http://localhost:8080
    • Download SOLR from one of the mirrors found here (downloaded the apache-solr-3.4.0-src.tgz package) and unzip the package. e.g. Solr is extracted at /home/abashetti/Downloads/apache-solr-3.4.0/
    • Open the Terminal. Go to the extracted apache solr folder. e.g. cd /home/abashetti/Downloads/apache-solr-3.4.0/solr
    • Create the solr war. Run the ant commands – ant clean , ant compile and ant dist.
    • Ant dist will create the *solr*.war in */solr/dist/ folder. e.g. path for the war file is(/home/abashetti/Downloads/apache-solr-3.4.0/solr/dist).
    • Create a directory SOLR. It is the SOLR HOME, where SOLR will be hosted from
    • (e.g. /home/abashetti/Downloads/solr).
    • Copy the files and folder from path /home/abashetti/Downloads/apache-solr-3.4.0/solr/example/solr/ to your  SOLR HOME. e.g destination path is
    • (/home/abashetti/Downloads/solr/).
    • Copy the *solr*.war file from the dist directory in the unzipped SOLR package to your Tomcat webapps folder.
    • Rename the *solr*.war file to solr.war
    • Specify the SOLR HOME in the catlina.sh
    • JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/abashetti/Downloads/solr"
    • Add the above line just below the JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
    • Test that solr is running from the web browser http://localhost:8080/solr/admin/ 












No comments:

Post a Comment