Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build solr Cluster by solr7.5+zookeeper3.5.5

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "how to build a solr cluster in solr7.5+zookeeper3.5.5". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "solr7.5+zookeeper3.5.5 how to build solr clusters"!

one。 Set up the background

There are many bottlenecks in load and concurrency of stand-alone solr, which may cause solr downtime in production environment due to excessive traffic. Therefore, it is necessary to build solr clusters to ensure that solr works properly when there is a large number of visits. SolrCloud is a distributed search solution provided by Solr, which can be used when you need large-scale, fault-tolerant, distributed indexing and retrieval capabilities.

two。 Start building 1. Preparatory work:

Solr7.5

Zookeeper3.5.5

Three linux servers (you can build three virtual machines by yourself) the three ip here are 10.0.0.62,10.0.0.64 and 10.0.0.65 respectively.

Link: https://pan.baidu.com/s/1eaHZPSKSWGLl7ZXSUSZ_SA

Extraction code: ani8

After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.

Attachment: if you need ik participle, download the jar package in advance.

two。 Start deployment:

Extract apache-zookeeper-3.5.5.tar.gz and solr-7.5.0.tgz into / usr/local/server/zookeeper-3.5.5-2019Cloud and / usr/local/server/solr-7.5.0-2019Cloud of the server, respectively

Set up zookeeper

a. Open / usr/local/service/zookeeper-3.5.5-2019Cloud and create "data" and "log" folders

Cd / usr/local/service/zookeeper-3.5.5-2019Cloudmkdir data / / create a folder mkdir log

b. After the creation is successful, open the conf folder

Cd conf/

c. Rename zoo_sample.cfg to zoo.cfg

Mv zoo_sample.cfg zoo.cfg

Create the zookeeper identity file myid under the d. / data directory, and set the identity id

Cd / usr/local/server/zookeeper-3.5.5-2019Cloud/// Note: the ID of the three zookeeper cannot be the same. Here the settings are 1, 2, 3touch 1-> myid.

e. Modify zoo.cfg configuration if there are three servers, then all three are the same configuration, edit dataDir (data directory configuration), clientPort (current zeekeeper port), dataLogDir (log directory configuration), server.id (configure zookeeper cluster example: server.1=192.168.41.166:2881:3881 = server. Identify id = ip: communication port: voting port, where server.1 is the myid file value set above)

3. Set up solr

a. Open / usr/local/server/solr-7.5.0-2019Cloud/bin to modify the solr.in.sh file

Set solr.in.sh files ZK_HOST and SOLR_PORT; note: if it is a single service with multiple solr, you also need to modify the SOLR_HOST

ZK_HOST= "10.0.0.62 2181" SOLR_PORT=8982

b. After modifying the solr configuration file (such as managed-schema) on any machine, you can upload the configuration in / usr/local/server/solr-7.5.0-2019Cloud/server/scripts/cloud-scripts. The upload command is as follows (. / zkcli.sh-zkhost zkh2,zkh3,zkh4-cmd upconfig-confdir / usr/local/server/solr/xxx-confname xxxxx):

. / zkcli.sh-zkhost 10.0.0.62 confdir 2181 cmd upconfig-confdir / usr/local/server/solr-7.5.0-2019Cloud/server/solr/configsets/_default/conf-confname searchConfig. Start solrCloud:1. Start zookeeper

Open the bin directory of zookeeper and run sh zkService.sh start to start

Sh zkService.sh status can view the running status

two。 Start solr

a. Open the bin directory of solr and run the command. / solr start-force to open solr

b. When enabled, select config to create a collection

Success!

At this point, I believe you have a deeper understanding of "how to build a solr cluster in solr7.5+zookeeper3.5.5". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report