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
Modify the server.xml file to modify the port number, a total of 3
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.
Check whether the upload is successful. Use zookeeper's zkCli.sh command.
These 2 files have been uploaded
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
Slow start
Need to be patient
Check if each one has started
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
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
OK, so the entire zookeeper-solr cluster is built