In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you an example analysis of solr and zookeeper building solrcloud distributed indexing service. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
Pre-installation preparation
Http://mirrors.hust.edu.cn/apache/zookeeper/
Http://apache.fayea.com/apache-mirror/tomcat/tomcat-7/v7.0.55/src/
Https://issues.apache.org/jira/secure/attachment/12436620/ZooInspector.zip
Http://apache.fayea.com/apache-mirror/lucene/solr/4.9.0/
Extract the compressed package to D:\ apache
Extract the tomcat and copy four copies to form four simulation nodes, which are renamed to tomcat7-8983. As shown in the following figure, this folder is 8983, 8984, 8985, 8986.
1. Create a new folder solrbase under 8983-8986, extract solr-4.9.0, and copy the solr folder under solr-4.9.0\ solr-4.9.0\ example to solrbase. Then copy the solr.war under solr-4.9.0\ webapps to 8983\ webapps, and then copy it to the corresponding webapps of 8984 and 8985.
At this point, you can start the 8983/bin/start.bat file, let tomcat start, and then go to 8983\ conf\ Catalina\ localhost to create a new solr.xml file with the following contents:
Note: the value of docBase depends on the location of the war package you copied in the tomcat container. Solr/home 's value is the directory of solr under the solrbase you just created in step 3.
3.。 Repeat the above operation, and set 8984, 8985, 8986 respectively.
In order that the startup port of tomcat's server will not be occupied, you need to modify the port of the server.xml file under the three directories conf of 8084 and 8985.
Under the 8983 file, just modify it. The port below 8984 is 8984, and all other ports can be added by 1.
4. Extract the zookeeper-3.3.6.tar.gz to apache\ zookeeper-3.3.6, and then create a new temp under the directory as a temporary data folder. Rename zoo_sample.cfg to zoo.cfg under apache\ zookeeper-3.3.6\ conf, change the dataDir to the temp folder you just created, and start apache/zookeeper-3.3.6/bin/zkServerNaNd.
5. Set 8983 as the leader node, which needs to be added in the second line of bin/catalina.bat under the 8983 directory.
Set JAVA_OPTS=-Dbootstrap_confdir=D:\ apache\ tomcat7-8983\ solrbase\ solr\ collection1\ conf-Dcollection.configName=clusterconf-DzkRun-DzkHost=localhost:2181-DnumShards=2
Note: the value of-Dbootstrap_confdir is the collection1\ conf file under your solr/home.
Add the following in the second line of the bin/catalina.bat file under 8984, 8985, 8986:
Set JAVA_OPTS=-DzkRun-DzkHost=localhost:2181-DnumShards=2
5. Change the solr boot port to correspond to your tomcat port
6. Because the log has changed since solr4.3, you need to set the
Copy these jar files to D:\ apache\ tomcat7-8983\ webapps\ solr\ WEB-INF\ lib, and do the same with 8984.
Create a new folder classes under 8983\ webapps\ solr\ WEB-INF, copy the solr-4.9.0\ example\ resources/log4j.properties file under the classes file you just created, and modify the log4j.appender.file.File=../solr_logs/solr.log log path out of line 16.
8. Start the zk server first, and then start tomcat 8983 in turn. 8986
The above is the analysis of the example of building solrcloud distributed indexing service between solr and zookeeper shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.