1.首先搭建zookeeper集群,具體請參照http://metebee.blog.51cto.com/8650444/1730280


上傳本地配置文件到zookeeper:

阿里云cloud shell,D:\solrCloud\solr-5.2.1\server\scripts\cloud-scripts

zkcli.bat -cmd upconfig -zkhost? <host:port> -confname <name?for?configset> -solrhome <solrhome> -confdir <path to directory with configset>

例如:sh zkcli.sh -cmd upconfig -zkhost 127.0.0.1:2181 -confname solrc -solrhome solrcloud -confdir /home/solr-5.2.1/example/example-DIH/solr/solr/conf

單文件上傳:zkcli.bat -zkhost localhost:2181 -cmd putfile /configs/solrcloud/schema.xml D:\solrCloud\cloud_conf\schema.xml

搭建一個自己的網站、2.下載Solr5.2.1,http://mirrors.cnnic.cn/apache/lucene/solr/

3.解壓,新建三個目錄1、2、3

復制solr-5.2.1\server\solr下的solr.xml到1、2、3下面

4.命令行進入solr-5.2.1,執行

快速搭建個人網站。bin\solr.cmd -cloud -z 127.0.0.1:2181 -s 1 -p 8080

bin\solr.cmd -cloud -z 127.0.0.1:2181 -s 2 -p 8081

bin\solr.cmd -cloud -z 127.0.0.1:2181 -s 3 -p 8082

5.創建collection,shared,replication

怎樣搭建屬于自己的網站。http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&numShards=2&replicationFactor=1

6.如修改配置文件,不用重啟服務,可重新讀取

http://localhost:8983/solr/admin/collections?action=RELOAD&name=newCollection


快速搭建網站框架,