Installation de SOLR

Cette procédure a été testée avec la version 7.0.28 de Tomcat et la version 4.10.3 de Solr

Télécharger Solr

# wget http://apache.cu.be/lucene/solr/4.10.3/solr-4.10.3.tgz

Décompresser l'archive vers le répertoire /usr/local

# tar xzf solr-4.10.3.tgz -C /usr/local/

Créer un lien symbolique

# ln -s /usr/local/solr-4.10.3/ /usr/local/solr

cd /usr/local/src
wget http://www.eng.lsu.edu/mirrors/apache/lucene/solr/4.10.2/solr-4.10.2.tgz
tar xvf solr-4.10.2.tgz

Install the the Apache Solr java libraries into Tomcat's library directory.
# yes | cp -a dist/solrj-lib/* /usr/share/tomcat7/lib/

Install the Apache Solrl log4j.properties configuration file into Tomcat's conf directory
# yes | cp -a example/resources/log4j.properties /var/lib/tomcat7/conf/

Install Apache Solr's webapp solr-*.war into Tomcat's webapps directory.
# yes | cp -a dist/solr-4.10.3.war /var/lib/tomcat7/webapps/solr.war

cp -r solr/example/lib/ext/* /usr/share/tomcat7/lib
cp -r solr/example/resources/log4j.properties /usr/share/tomcat7/lib

# vi /var/lib/tomcat7/conf/Catalina/localhost/solr.xml
<Context docBase="/var/lib/tomcat7/webapps/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="/usr/share/solr/example/multicore" override="true" />
</Context>

# chown -R tomcat7 /usr/share/solr/example/multicore