[ZooKeeper] Search service Solr cluster construction uses ZooKeeper as the proxy layer

Install four tomcats, and modify their port numbers to not conflict. 8080~8083

If it is in a formal environment, use 4 linux as nodes respectively

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Modify the server.xml file to modify the port number, a total of 3

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Search service Solr cluster construction uses ZooKeeper as the proxy layer

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

Deploy solr to tomcat

Copy the stand-alone solr project to tomcat

Use FileZilla Client to copy solr on another machine. Copy the entire solr folder, including solrhome.

This solr is under the deployed tomcat7/webapp in the stand-alone version

Create solrhome for each solr instance

Step 4: Associate the corresponding solrhome for each solr instance to modify web.xml

By analogy, change the web.xml under solr of tomcat02 03 05

Modify the solr.xml file under each solrhome to modify the two attributes of host and hostPort. Are the corresponding ip and port numbers

vim solrhome01/solr.xml

Upload the configuration file to zookeeper. Need to use

/root/solr-4.10.3/example/scripts/cloud-scripts/zkcli.sh command to upload the configuration file.

Upload the /usr/local/solr-cloud/solrhome01/collection1/conf directory to zookeeper. (Upload only once, and other solrhomes are not needed), so that every node in the zk cluster reads the same configuration and requires that the zookeeper cluster has been started.

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Check whether the upload is successful. Use zookeeper's zkCli.sh command.

Search service Solr cluster construction uses ZooKeeper as the proxy layer

These 2 files have been uploaded

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Tell the location of the solr instance zookeeper. Need to modify tomcat catalina.sh to add

Every node needs to be added.

All four tomcats must do this. Step 9: Start each solr instance. Old-fashioned way

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Slow start

Need to be patient

Check if each one has started

Search service Solr cluster construction uses ZooKeeper as the proxy layer

access

Found that there is one more cloud

Such a structure has only one area shard1

8083 is the main, the others are the standby

Search service Solr cluster construction uses ZooKeeper as the proxy layer

Cluster fragmentation.

Divide the cluster into two slices, each with two copies.

http://192.168.1.200:8080/solr/admin/collections?action=CREATE&name=collection2&numShards=2&replicationFactor=2

Search service Solr cluster construction uses ZooKeeper as the proxy layer

OK, so the entire zookeeper-solr cluster is built

Guess you like

Origin blog.csdn.net/keepfriend/article/details/113654473