Solrcloud Environment Construction

Source: Internet
Author: User
Tags solr

Solrcloud is a distributed solution for SOLR, this article briefly introduces the environment configuration of Solrcloud. Because the actual production environment is mainly Linux system, this article will be carried out under the Linux system.

This article uses solr4.7 + zookeeper3.4.6 (standalone mode)

1 Configure two stand-alone SOLR services, which can be referenced here (broadly similar to Linux and Windows)

2 Install Zookeeper service, download decompression ZK, unzip into/zookeeper-3.4.6/conf directory will zoo_sample.cfg modified to zoo.cfg, change the text content to

Ticktime=2000initlimit=10synclimit=5datadir=/opt/qmtomcat7/zkdata  //zk Content path clientport=3181  //Port

Enter the/zookeeper-3.4.6/bin directory, execute the./zkserver.sh start service, and then execute the./zkserver.sh status to see if the startup was successful

3 associating Tomcat with ZK

Enter the Tomcat/bin path and the

Export  java_opts= "-dzkhost=58.30.66.31:3181-dbootstrap_conf=true"

Add to Catalina.sh

4 Enter the Solrhome path, modify the Solr.xml file, and modify the Hostport to the port number corresponding to Tomcat

<SOLR>  <Solrcloud>    <Strname= "Host">${host:}</Str>    <intname= "Hostport">${jetty.port:7777}</int><!--corresponding TOMCT port number--    <Strname= "Hostcontext">${HOSTCONTEXT:SOLR}</Str>    <intname= "Zkclienttimeout">${zkclienttimeout:15000}</int>    <BOOLname= "Genericcorenodenames">${genericcorenodenames:true}</BOOL>  </Solrcloud>  <shardhandlerfactoryname= "Shardhandlerfactory"class= "Httpshardhandlerfactory">    <intname= "Sockettimeout">${sockettimeout:0}</int>    <intname= "Conntimeout">${conntimeout:0}</int>  </shardhandlerfactory></SOLR>

5 Modify the Solrconfig.xml file under Solrcore to add a comment to the paragraph text

<!--   <lib dir= ". /.. /.. /contrib/extraction/lib "regex=". *\.jar "/>  <lib dir=". /.. /.. /dist/"regex=" Solr-cell-\d.*\.jar "/>  <lib dir=". /.. /.. /contrib/clustering/lib/"regex=". *\.jar "/>  <lib dir=". /.. /.. /dist/"regex=" Solr-clustering-\d.*\.jar "/>  <lib dir=". /.. /.. /contrib/langid/lib/"regex=". *\.jar "/>  <lib dir=". /.. /.. /dist/"regex=" Solr-langid-\d.*\.jar "/>  <lib dir=". /.. /.. /contrib/velocity/lib "regex=". *\.jar "/>  <lib dir=". /.. /.. /dist/"regex=" Solr-velocity-\d.*\.jar "/> --

6 Start Tomcat separately

Conclusion: As this article is left for their own reference use, the middle if there are omissions can be consulted. I myself also refer to a lot of other people's configuration steps, found that there are a small number of people found in the article there are errors or in accordance with the article described in the configuration is not successful began to scold the author of the article,

I think that is really should not, first of all, we as a programmer should know that sometimes a small detail can lead to the entire project failure, how do you know that it is not because of their mistakes and lead to errors, and secondly, we should not panic when we encounter abnormal hints,

You should see the abnormal tips when you like to see the same kind of family, and then follow the instructions to find the step-by-step, positioning, so maybe when you look up and find yourself in the configuration of the success of the whole project has all the additional knowledge. And the articles that everyone wrote on the internet.

may be different versions, the configuration of the way a little difference, but the essence is the same, look at the time need a bit of patience, can be configured before the general understanding of the entire SOLR architecture, and familiar with the following basic terminology and so on. (So much nonsense, I wish you all

Successfully solve the project needs, technical progress, maintain a good mood)

Solrcloud Environment Construction

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.