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

Configuration methods of zookeeper and solr clusters

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "the configuration method of zookeeper and solr cluster". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the configuration method of zookeeper and solr cluster".

Put down the address first.

Zookeeper 3.4.5 address: http://mirror.bjtu.edu.cn/apache/zookeeper/stable/zookeeper-3.4.5.tar.gz

Solr 4.3address: download first

1. SOLR service deployment machine planning:

1. Zookeeper Service (Java):

A:192.168.1.1,B:192.168.1.2,C:192.168.1.3

2. Solr (tomcat Container) service:

A:192.168.1.1,B:192.168.1.2,C:192.168.1.3

3. The above three machines need to be able to access ports 2008, 6008 and 9090 each other.

4. Cooperate with opening: "http://192.168.1.1:15080/solr"," http://192.168.1.2:15080/solr", "http://192.168.1.3:15080/solr" private network access permissions"

2. Zeekeeper cluster configuration (all zookeeper servers)

1. Get the zookeeper installation file through "wget http://mirror.bjtu.edu.cn/apache/zookeeper/stable/zookeeper-3.4.5.tar.gz"."

2. Extract the gz package to the ": / etc/zookeeper" directory, add the zoo.cfg file, or modify the configuration by zoo_sample.cfg.

Join:

Server.1=192.168.1.1:2008:6008

Server.2=192.168.1.2:2008:6008

Server.3=192.168.1.3:2008:6008

The goal is to configure each server in the cluster and specify ports 2008 and 6008 for communication within the cluster.

3. Create a new zookeeper data file directory: / data/appsdata/solr/zookeeper

4. Create a new myid file in the "/ data/appsdata/solr/zookeeper" directory, edit the server corresponding ID information and save it. The file is different for each zookeeper service machine.

Such as echo "1" > / data/appsdata/solr/zookeeper/myid

5. Configure the JVM startup parameters and add the java.env file in the "/ etc/zookeeper/bin" directory

Content:

#! / bin/sh

Export JVMFLAGS= "- Xms1024m-Xmx1024m $JVMFLAGS"

6. Start / etc/zookeeper/bin/zkServer.sh start

7. Verify the service status: / etc/zookeeper/bin/bin/zkServer.sh status

3. Solr project deployment (all tomcat servers)

1. Download tomcat container and modify server.xml configuration, including "URIEncoding=" UTF-8 "maxThreads=" 3000 "acceptCount=" 3000 "port=" 9090 "

Reference: http://www.cnblogs.com/hupengcool/archive/2013/05/11/3072573.html

2. Modify the startup file catalins.sh of tomcat and add the following configuration:

JAVA_OPTS= "$JAVA_OPTS-server-Xms1024M-Xmx2048M-XX:MaxPermSize=512M-XX:+CMSClassUnloadingEnabled-XX:-UseLargePages-XX:+UseParallelGC-XX:+UseParallelOldGC"

SOLR_OPTS= "- Dsolr.solr.home=/data/appsdata/solr/solr_home-Dport=9090-DhostContext=solr-DzkClientTimeout=20000-DzkHost= 192.168.1.1 purl 2181,54.192.168.1.2: 2181, 5192.168.1.3: 2181"

JAVA_OPTS= "$JAVA_OPTS $SOLR_OPTS"

3. Upload the solr.zip project to the webapps directory, decompress it, and delete the solr.zip package.

4. Modify the web.xml to specify the native path of the solr web service.

4. Solr-home configuration (all tomcat servers)

1. Create a new solr-home directory: / data/appsdata/solr/solr_home

2. Upload solr.xml to solr-home directory. The file is different for each tomcat service machine. You should mainly pay attention to configuring port and IP.

Finally, upload the configuration files (solrconfig.xml and schema.xml) of solr to zookeeper to see if the files are synchronized to the solr service.

Upload statements, such as:

Java-classpath "/ data/apps/solr/WEB-INF/lib/*" org.apache.solr.cloud.ZkCLI-cmd upconfig-zkhost "127.0.0.1 purl 2181"-confdir / data/appsdata/solr/conf/search-confname search

Java-classpath "/ data/apps/solr/WEB-INF/lib/*" org.apache.solr.cloud.ZkCLI-cmd linkconfig-zkhost "127.0.0.1 purl 2181"-collection search-confname search

Thank you for reading, the above is the content of "the configuration method of zookeeper and solr clusters". After the study of this article, I believe you have a deeper understanding of the configuration method of zookeeper and solr clusters, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Servers

Wechat

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

12
Report