ubuntu14.04 under TOMCAT7 deployment solr-4.10.4

Source: Internet
Author: User
Tags solr

Have seen a lot of installed blog posts, combined with several plans to write their own simple integrated step, first ensure that the installation of JDK and Tomcat

1. Download solr-4.10.4, unzip to/opt

2. Select a directory for SOLR and use the SOLR_HOME environment variable to point to this directory, I chose/OPT/SOLR here, so my solr_home=/opt/solr. If you want to choose a different directory please replace/OPT/SOLR

3. Copy/opt/solr-4.10.4/example/solr/* to/OPT/SOLR

4. Copy/opt/solr-4.10.4/example/webapps/solr.war to/OPT/SOLR

5. Edit the DataDir configuration item in/opt/solr/collection1/conf/solrconfig.xml

        < dataDir >${solr.data.dir:/opt/solr/data}</ dataDir >

6. Create a Data Catalog for SOLR, Mkdir/opt/solr/data

7. To set up a new context (Web application) in Tomcat and point to our SOLR file, simply create the file /etc/tomcat/conf/localhost/solr.xml , which reads as follows:

<? 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 >

8. Modify the tomcat/webapp/solr/web-inf/web.xml file as follows:

<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/opt/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>

9. Copy all jar packages under the /opt/solr-4.10.4/example/lib/ext directory to the /opt/tomcat/webapp/solr/web-inflib directory.

10. Copy /opt/solr-4.10.4/example/example-dih/solr/db/conf/currency.xml to solr/collection1/ conf/under



ubuntu14.04 under TOMCAT7 deployment solr-4.10.4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.