Install Apache Solr on CentOS 6

mantle-solrSolr 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.

  1. Install Tomcat6 and its dependencies:[bash]yum install tomcat6[/bash]
  2. Install  Tomcat6-admin: [bash]yum install tomcat6[/bash]
  3. Edit /etc/tomcat6/tomcat-users.xml to add a new tomcat admin/manager
  4. 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)
  5. 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"/>
    </Context>[/xml]
  6. Restart tomcat:[bash]service tomcat6 restart[/bash]

Similar Posts

  • Some Linux performance testing commands

    This short tutorial mentions some Linux performance testing commands to measure server/VPS performance. This will be added gradually as soon as I have more tools to test 🙂 1. Test disk IO: [bash]$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 15.1643 s, 70.8 MB/s[/bash] 2. Test disk…

  • Migrate Gitlab to new server

    When migrating gitlab to a new server, you might face much problems of in-compatible versions, different OS (so different latest gitlab version), etc. The best way is to upgrade the old server to the same latest gitlab version, then backup gitlab, and then transfer the backup to the new server, install same latest gitlab version…

  • CentOS 7 workaround

    Switching from CentOS 6 to CentOS 7 might be a little pain for many users. The main reason is that in CentOS 7, there are several changes which make the end-users feel not comfortable.  This quick note will introduce some new way to do some regular commands in CentOS 7. 1. Using systemctl In CentOS 6,…

  • Install Chef server Lets Encrypt

    Do not want to mention what Chef is, or what Let’s Encrypt is. This is just a short step-by-step tutorial to guide you how to install Chef server Lets Encrypt for the server SSL. Setup Let’s Encrypt First, install let’s encrypt to generate a standalone certificate before installing chef server: [bash]git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt…

  • Using Handbrake CLI for video encoding in CentOS

    This tutorial will guide you how to install Handbrake CLI in CentOS and use it for video encoding / converting. Installation It is suggested to use LinuxTech repo to install Handbrake CLI on CentOS automatically (Ubuntu can easily add ppa:stebbins/handbrake-releases). First, add the repo at /etc/yum.repos.d/linuxtech.repo as follows: [bash][linuxtech-release] name=LinuxTECH.NET el6 main repo baseurl=http://linuxsoft.cern.ch/linuxtech/el6/release/ http://pkgrepo.linuxtech.net/el6/release/ mirrorlist=http://pkgrepo.linuxtech.net/el6/release/mirrorlist.txt mirrorlist_expire=7d…

Leave a Reply

Your email address will not be published. Required fields are marked *