安装server jre 1.8 server-jre-8uversion-linux-x64.tar.gz
http://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_server_jre.html#CACJHCDD
http://lucene.apache.org/solr/quickstart.html
bin/solr start
bin/solr start -c -z server1:2181,server2:2181
bin/solr create -c myindex
bin/solr create -c logs -d basic_configs -n basic will upload the server/solr/configsets/basic_configs/conf directory to ZooKeeper as /configs/basic.
bin/solr create -c mycoll -d /tmp/myconfigs, will upload /tmp/myconfigs into ZooKeeper under /configs/mycoll
bin/solr create -c par_module -d myconfigs -n myconfig
Other collections can share the same configuration by specifying the name of the shared configuration using the -n option. For instance, the following command will create a new collection that shares the basic configuration created previously: bin/solr create -c logs2 -n basic
使用外部zk时,要上传solr配置文件到zk
server/scripts/cloud-scripts/zkcli.sh -zkhost dbmon:3008/ -cmd bootstrap -solrhome server/solr
IMPORTANT: If your ZooKeeper connection string uses a chroot, such as localhost:2181/solr, then you need to bootstrap the /solr znode before launching SolrCloud using the bin/solr script. To do this, you need to use the zkcli.sh script shipped with Solr, such as:
server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181/solr -cmd bootstrap -solrhome server/solr
bin/solr start -c -z dbmon:3008