SOLR Cloud(1)Zookeeper

SOLR Cloud(1)Zookeeper

1 Prepare the Environment
First of all, set up JDK
I already have the latest JDK version on my ubuntu system.
> java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

2 Set up Zookeeper Cluster
http://sillycat.iteye.com/blog/2015175
http://sillycat.iteye.com/blog/2183932
Latest zookeeper and set up cluster
> wget http://apache.mirrors.tds.net/zookeeper/stable/zookeeper-3.4.8.tar.gz

Unzip and place in the right directory
Prepare the configuration files as follow:
>cat conf/zoo1.cfg
server.1=ubuntu-master:2888:3888
server.2=ubuntu-dev1:2888:3888
server.3=ubuntu-dev2:2888:3888

>cat conf/zoo2.cfg
server.1=ubuntu-master:2888:3888
server.2=ubuntu-dev1:2888:3888
server.3=ubuntu-dev2:2888:3888

>cat conf/zoo3.cfg
server.1=ubuntu-master:2888:3888
server.2=ubuntu-dev1:2888:3888
server.3=ubuntu-dev2:2888:3888

Set up the myid on all the servers
> cat /tmp/zookeeper/myid
1

> cat /tmp/zookeeper/myid
2

> cat /tmp/zookeeper/myid
3

Start 3 nodes
> zkServer.sh start zoo1.cfg
> zkServer.sh start zoo2.cfg
> zkServer.sh start zoo3.cfg

One way to check if it is running
> jps
32581 QuorumPeerMain
32663 Jps

Another way to check who is the leader/follower
> echo stat | nc localhost 2181 | grep Mode
Mode: follower

> echo stat | nc localhost 2181 | grep Mode
Mode: leader

Now, the zookeeper cluster is running there.


References:
solr
http://sillycat.iteye.com/blog/2227398

https://cwiki.apache.org/confluence/display/solr/SolrCloud
http://lucene.apache.org/solr/quickstart.html
http://www.cnblogs.com/BrianLearningNotes/p/4607810.html
https://segmentfault.com/a/1190000000595712

http://www.francelabs.com/blog/tutorial-solrcloud-5-amazon-ec2/
http://blog.thedigitalgroup.com/susheelk/2015/08/03/solrcloud-2-nodes-solr-1-node-zk-setup/
http://www.andrewrowland.com/article/display/install-solr-5-and-zookeeper-in-a-production-environment/
http://jayant7k.blogspot.com/2013/06/step-by-step-setting-up-solr-cloud.html

http://wiki.apache.org/solr/SolrCloud
https://cwiki.apache.org/confluence/display/solr/Nodes,+Cores,+Clusters+and+Leaders
https://cwiki.apache.org/confluence/display/solr/Distributed+Requests

solr multiple cores
http://sillycat.iteye.com/blog/2227398

elastic search
http://shiyanjun.cn/archives/1371.html
https://github.com/elastic/elasticsearch
http://www.shaheng.me/blog/2015/06/elasticsearch--.html
https://www.elastic.co/guide/en/elasticsearch/guide/current/getting-started.html
http://www.cnblogs.com/richaaaard/p/5231905.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326218718&siteId=291194637