Tomcat + SOLR

Source: Internet
Author: User

1. Decompress SOLR
[[Email protected] TMP] Tar-zxvf solr-4.7.0.tgz
2. Move the SOLR package to the OPT directory:
[[Email protected] TMP] Music/tmp/solr-4.7.0/opt/SOLR
3. Copy SOLR. War in exmaple/webapps to Tomcat
[[Email protected] TMP] makdir-P/opt/tomcat/webapps
[[Email protected] TMP] CP/opt/SOLR/example/webapps/SOLR. War/opt/tomcat/webapps/
[[Email protected] TMP] Vim/usr/local/tomcat/CONF/server. xml


<Host name = "localhost" appbase = "/opt/tomcat/webapps"
Unpackwars = "true" autodeploy = "true">


Change webapps to/opt/tomcat/webapps;


4. Start tomcat, automatically decompress SOLR. War, and modify web. xml under the SOLR project.
[[Email protected] TMP] cd/usr/local/tomcat/bin/
[[Email protected] bin]./startup. Sh
[[Email protected] bin] vi/opt/tomcat/webapps/SOLR/WEB-INF/Web. xml


5. Modify the SOLR home configuration (Note: You need to remove the comments of this Section, otherwise it will not take effect ):
<Env-entry>
<Env-entry-Name> SOLR/home </env-entry-Name>
<Env-entry-value>/opt/SOLR/example/SOLR </env-entry-value>
<Env-entry-type> JAVA. Lang. String </env-entry-type>
</Env-entry>


6. Copy the jar package under SOLR/example/lib/EXT to/tomcat/../SOLR/WEB-INF/lib:
[[Email protected] TMP] CP/opt/SOLR/example/lib/EXT/*. Jar/opt/tomcat/webapps/SOLR/WEB-INF/lib/
7. Create classpath under Tomcat SOLR and copy example/resources/log4j. properties to classpath:
[[Email protected] TMP] mkdir-P/opt/tomcat/webapps/SOLR/classpath
[[Email protected] TMP] CP/opt/SOLR/example/resources/log4j. properties/opt/tomcat/webapps/SOLR/classpath/
8. Restart tomcat after configuration is complete.
/Usr/local/tomcat/bin/shutdown. Sh
/Usr/local/tomcat/bin/startup. Sh
9. Enter http: // 192.168.1.196: 8080/SOLR/in the browser to go to The SOLR admin screen.


This article is from the blog "someone says my technology house", please be sure to keep this source http://1992mrwang.blog.51cto.com/3265935/1543694

Tomcat + SOLR

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.