Solr is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world’s largest internet sites.
This article shows how to install solr in a Linux production environment.
- Install Tomcat6 and its dependencies:[bash]yum install tomcat6[/bash]
- Install Tomcat6-admin: [bash]yum install tomcat6[/bash]
- Edit /etc/tomcat6/tomcat-users.xml to add a new tomcat admin/manager
- Download solr package (http://lucene.apache.org/solr/downloads.html), and get solr project to anywhere (e.g.: we put solr projects at /home/solr/public)
- Create a new xml file at /etc/tomcat6/Catalina/localhost/ to put solr configuration, for example:[xml]<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/home/solr/public/webapps/solr.war" debug="1" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/home/solr/public/solr" override="true"/>
- Restart tomcat:[bash]service tomcat6 restart[/bash]