Search service SOLR cluster build using zookeeper as agent layer

Source: Internet
Author: User
Tags solr redis cluster

The previous article built the zookeeper cluster

Well, today we can build a cluster of SOLR search service, which is different from Redis cluster, it needs ZK management, as an agent layer

Install four Tomcat and modify its port number to not conflict. 8080~8083

If it is a formal environment, use 4 Linux nodes respectively

Modify the Server.xml file to modify the port number by a total of 3

The above steps are repeated on the tomcat03,tomcat04, but 3 ports must be careful not to repeat

Deploy SOLR under Tomcat

Copy the single-version SOLR project to Tomcat

SOLR on another machine, copy it with the FileZilla Client tool to copy the entire SOLR folder, including Solrhome

This SOLR is a standalone version of the Tomcat7/webapp that has been deployed

Create solrhome for each SOLR instance

Fourth Step: Associate the corresponding solrhome for each SOLR instance modify Web. xml

And so on, the Web. XML under the tomcat02 03 05 in SOLR

Modify the Solr.xml file under each solrhome to modify the host, Hostport two properties. The corresponding IP and port number, respectively

Vim Solrhome01/solr.xml

Upload the configuration file to zookeeper. Need to use

The/root/solr-4.10.3/example/scripts/cloud-scripts/zkcli.sh command uploads the configuration file.

Upload the/usr/local/solr-cloud/solrhome01/collection1/conf directory to zookeeper. (Upload once, several other solrhome can not be needed), so the ZK cluster each node read the same configuration needs zookeeper cluster has been started.

See if the upload was successful. Use the Zookeeper zkcli.sh command.

These 2 files have been uploaded

Tells the location of the SOLR instance zookeeper. Need to modify Tomcat's catalina.sh add

Each node needs to be added.

4 Tomcat is going to do this. Step nineth: Start each SOLR instance. More old-fashioned way.

Slow start

Need to wait patiently

Check to see if each one has been started

Access

Found a cloud more

Such a structure is only one piece of area Shard1

8083 is the master, others are prepared

Cluster shards.

Divide the cluster into two pieces, two copies per piece.

http://192.168.1.200:8080/solr/admin/collections?action=create&name=collection2&numshards=2& replicationfactor=2

OK, so the whole ZOOKEEPER-SOLR cluster is built.

Search service SOLR cluster build using zookeeper as agent layer

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.