1、zookeeper集群安装:
参考:https://blog.youkuaiyun.com/jiangxuexuanshuang/article/details/103799968
2、配置系统信息
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf
echo "* soft nproc 65536" >> /etc/security/limits.conf
echo "* hard nproc 65536" >> /etc/security/limits.conf
ulimit -a
3、配置solr启动信息
echo "ZK_HOST=\"192.168.1.xxa:2181,192.168.1.xxb:2181,192.168.1.xxc:2181/solr\"" >> bin/solr.in.sh
echo "SOLR_HOST="192.168.1.xxa"" >> bin/solr.in.sh
echo "SOLR_TIMEZONE="UTC+8"" >> bin/solr.in.sh
4、因为设置了solr的chroot,需要添加zookeeper节点
bin/zkCli.sh -server 192.168.1.151:2181
create /solr
bin/zkCli.sh -server 192.168.1.152:2181
create /solr
bin/zkCli.sh -server 192.168.1.153:2181
create /solr
5、启动集群solr
bin/solr start -c -force
6、solr创建集合
bin/solr create_collection -c collection1 -s 2 -rf 2 -force