In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
SolrCloud requires solr to be deployed based on zookeeper. Zookeeper is a cluster management software, because SolrCloud needs to be composed of multiple servers. Zookeeper is responsible for coordination and management. Zookeeper is a registry that registers public resources with Zookeeper and is the coordinator of services.
Zookeeper cluster building
1) create a folder solrCloud under the / usr/local directory
2) use the FTP tool to import the zookeeper package into the solrCloud folder, and rename it to zookeeper1 after decompression
3) copy two copies of the zookeeper service in the current directory
4) rename the configuration file of each zookeeper service, (zookeeper1/conf/zoo_sample.cfg): mv zoo_sample.cfg zoo.cfg
5) Edit zoo.cfg, and modify the port numbers of the three zookeepers as 2182, 2183, and 2184, respectively.
6) modify the data storage directory
Create a data,log directory under each zookeeper directory
Edit zoo.cfg to modify the following path
7) configure heartbeat detection
Configure the following information in the zoo.cfg of each zookeeper
8) create an election ID
Create a file under the data directory of each zookeeper: myid,zookeeper1 edit myid, fill in 1, Zookeeper2 (myid= 2), zookeeper3 (myid=3)
9) zookeeper cluster testing
Open these three zookeeper services
And check the status of these three services, successful..
Build stand-alone solr
1) use the ftp tool to upload apache-tomcat-7.0.47.tar.gz/solr-4.10.3.tgz.tgz packages to / usr/local/solrCloud and extract them
2) enter the solr-4.10.3/example/webapps directory, find solr.war, copy it to apache-tomcat-7.0.47/webapps, start the tomcat,war package to decompress automatically to get the solr folder, and then delete the solr.war package.
3) copy the jar package under solr-4.10.3/example/lib/ext to apache-tomcat-7.0.47/webapps/solr/WEB-INF/lib
4) copy the solr-4.10.3/example/resource/log4j.properties file to the apache-tomcat-7.0.47/webapps/solr/WEB-INF/classes. If the classes folder is not available, create it yourself.
5) create a solrhome folder under the / usr/local/solrCloud folder and copy the data from solr-4.10.3/example/solr to the solrhome folder
6) go to the solr-4.10.3/ folder and find the contrib and dist folders, and copy them to the solrhome folder
7) enter the solrCloud/solrhome/collection1/conf folder
Edit the solrconfig.xml file and change the lib path to an absolute path
8) Edit the / usr/local/solrCloud/ apache-tomcat-7.0.47/webapps/solr/WEB-INF/web.xml file and specify the solr warehouse address
9) restart tomcat, and the browser successfully accesses http://39.108.3.131:8080/solr, as follows
Solr cluster building
1) modify the name of the solrCloud/apache-tomcat-7.0.47 folder to tomcat1, and rename it to tomcat2/3/4 in three copies
2) rename the solrhome folder in the solrCloud directory to solrhome1, and rename it to solrhome2/3/4 in three copies
3) specify the warehouse address and zookeeper registry for each tomcat
Configure the catalina.sh profile for each tomcat
Add content in the following figure (tomcat1 is solrhome1,tomcat2 and solrhome2..)
4) find / usr/local/solrCloud/tomcat1/conf/server.xml, edit the xml file, and modify each tomcat port (each tomcat has three ports to change):
Tomcat1:8061/8050/8062;tomcat2:8063/8051/8064;tomcat3:8065/8052/8066;tomcat4:8067/8053/8068
5) modify the cluster monitoring port of each solr warehouse, the file address is / usr/local/solrCloud/solrhome1/solr.xml, and the monitoring port is the same as the tomcat running port (solrhome1 and tomcat1 are the same …)
6) specify the warehouse address of each solr application
Edit / usr/local/solrCloud/tomcat1/webapps/solr/WEB-INF/web.xml file (one-to-one correspondence between solr application and solr repository)
7) submit the solr cluster configuration file to the zookeeper registry for management. When the solr cluster needs to load the configuration file, you only need to obtain the configuration file from zookeeper.
Command location: / solr-4.10.3/example/scripts/cloud-scripts/zkCli.sh
Upload command:. / zkcli.sh-zkhost 172.18.103.142 cmd upconfig 2182,172.18.103.142 cmd upconfig 2183,172.18.103.142 confdir / usr/local/solrCloud/solrhome1/solr/collection1/conf-confname myconf
8) Log in to zookeeper to view
. / zkCli.sh-server 172.18.103.142purl 2182
9) start 4 tomcat services
Sh tomcat1/bin/startup.sh
Sh tomcat2/bin/startup.sh
Sh tomcat3/bin/startup.sh
Sh tomcat4/bin/startup.sh
10) visit http://39.108.3.131:8050/solr/, click cloud, and succeed..
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.