Download the latest stable release from this link:2. Download Tomcat
http://www.apache.org/dyn/closer.cgi/lucene/solr/
wget http://www.meisei-u.ac.jp/mirror/apache/dist/lucene/solr/1.3.0/apache-solr-1.3.0.tgz
cd ~3. Unpack Tomcat
wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz
tar xvfz apache-tomcat-6.0.18.tar.gz4. Edit Server.xml.
mv ./apache-tomcat-6.0.18 /home/search/tomcat
cd /home/search/tomcatModify the server.xml as following.
vi conf/server.xml
5. Setup the environment variables for solr.<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"
useBodyEncodingForURI="true" />
echo "export CATALINA_BASE=/home/search/tomcat" >> ~/.bashrc6. Unpack Solr
echo "export CATALINA_HOME=/home/search/tomcat" >> ~/.bashrc
echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre" >> ~/.bashrc
echo "export PATH=${JAVA_HOME}/bin:${PATH}" >> ~/.bashrc
source ~/.bashrc
tar xvfz apache-solr-1.3.0.tgz7. Setup Solr
8. Startup tomcatcp apache-solr-1.3.0/dist/apache-solr-1.3.0.war /home/search/tomcat/webapps/solr.war
cp -r apache-solr-1.3.0/example/solr /home/search/solr
echo "export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/search/solr" >> ~/.bashrc
cd /home/search
/home/search/tomcat/bin/startup.sh
9. Test Solrhttp://localhost:8080/solr/adminReference:
http://owahab.com/content/installing-and-configuring-solr-debian-gnulinux
export JAVA_OPTS is incorrect in my environment.
ReplyDeleteThe correct way is
echo "export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/search/solr" >> ~/.bashrc