Steps to install apache-solr under tomcat6 on CentOS 6.2

Steps to install apache-solr under tomcat6 on CentOS 6.2

1. cd /usr/local/src
2. mkdir RPMS
3. cd RPMS
4. wget http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-release-6-3.jpp6.noarch.rpm
5. yum localinstall jpackage-release-6-3.jpp6.noarch.rpm
6. yum install tomcat6
7. wget ftp://ftp.pbone.net/mirror/www.jpackage.org/jpackage/5.0/generic/free/RPMS/jakarta-poi-3.2-1.jpp5.noarch.rpm
8. yum localinstall jakarta-poi-3.2-1.jpp5.noarch.rpm
9. yum install ant
10. chkconfig –level 3 tomcat6 on
11. chkconfig –level 4 tomcat6 on
12. chkconfig –level 5 tomcat6 on
13. chkconfig –level 6 tomcat6 on
14. cd /usr/share
15. wget http://mirrors.sonic.net/apache/lucene/solr/3.6.0/apache-solr-3.6.0.tgz
16. tar xzvf apache-solr-3.6.0.tgz
17. vi /usr/share/tomcat6/conf/Catalina/localhost/solr-example.xml

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/share/apache-solr-3.6.0/example/solr/solr.war" debug="0"
crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/share/apache-s
olr-3.6.0/example/solr" override="true" />
</Context>

18 chmod -R a+rwx /usr/share/apache-solr-3.6.0/example 
19 service tomcat6 stop
20 service tomcat6 start
21 http://servername.com:8080/solr-example/admin

Done.

Leave a Reply

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