Skip to content

Instantly share code, notes, and snippets.

@muke5hy
Created May 23, 2013 07:19
Show Gist options
  • Select an option

  • Save muke5hy/5633257 to your computer and use it in GitHub Desktop.

Select an option

Save muke5hy/5633257 to your computer and use it in GitHub Desktop.
Install solr on Centos 6.3 with tomcat
yum install java-1.7.0-openjdk.i686
yum install tomcat6.noarch
wget http://mirror.lividpenguin.com/pub/apache/lucene/solr/4.0.0/apache-solr-4.0.0.tgz
tar -xzvf apache-solr-4.0.0.tgz
cd apache-solr-4.0.0
cp -a example/solr /opt/
cp dist/apache-solr-4.0.0.war /opt/solr/solr.war
chown tomcat:tomcat -R /opt/solr
cat > /usr/share/tomcat6/conf/Catalina/localhost/solr.xml <<EOF
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/opt/solr/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/opt/solr/" override="true"/>
</Context>
EOF
chkconfig tomcat6 on && service tomcat6 restart
http://localhost:8080/solr/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment