solr7.5+zookeeper3.4.12+jdk1.8+zkui
阿新 • • 發佈:2018-09-26
mkdir tor data confd ini limit tab 5.0 serve 1、下載軟件(node1+node2+node3)
# wget https://www.apache.org/dist/zookeeper/stable/zookeeper-3.4.12.tar.gz # wget http://mirrors.hust.edu.cn/apache/lucene/solr/7.5.0/solr-7.5.0.tgz # wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz # mv apache-maven-3.5.4 /usr/local/ # tar xf jdk-8u181-linux-x64.tar -C /usr/local/ # tar xf solr-7.5.0.tgz -C /usr/local/ # tar xf zookeeper-3.4.12.tar.gz -C /usr/local/ # ln -s /usr/local/jdk1.8.0_181 /usr/local/jdk1.8 # ln -s /usr/local/zookeeper-3.4.12 /usr/local/zookeeper # ln -s /usr/local/solr-7.5.0 /usr/local/solr # ln -s /usr/local/apache-maven-3.5.4 /usr/local/maven
2、環境變量(node1+node2+node3)
export JAVA_HOME=/usr/local/jdk1.8
export JRE_HOME=/usr/local/jdk1.8/jre
export PATH=$PATH:$JAVA_HOME/bin:/usr/local/maven/bin
3、zookeeper集群
1)node1+node2+node3
cat /usr/local/zookeeper/conf/zoo.cfg | grep -v "^#" tickTime=2000 initLimit=10 syncLimit=5 dataDir=/tmp/zookeeper/data DataLogDir=/tmp/zookeeper/logs clientPort=2181 server.1=192.168.57.11:2888:3888 server.2=192.168.57.12:2888:3888 server.3=192.168.57.13:2888:3888 mkdir /tmp/zookeeper/{data,logs}
2)啟動zk(node1+node2+node3)
/usr/local/zookeeper/bin/zkServer.sh start
/usr/local/zookeeper/bin/zkServer.sh status
4、配置zkui
#git clone https://gitee.com/ilanni/zkui.git #cd zkui #mvn clean install #vim /root/zkui/config.cfg jdbcUser=root jdbcPwd=manager zkServer=192.168.57.11:2181,192.168.57.12:2181,192.168.57.13:2181 #nohup java -jar target/zkui-2.0-SNAPSHOT-jar-with-dependencies.jar & 瀏覽器 http://192.168.57.11:9090([根據爛泥zkui搭建](https://www.ilanni.com/?p=13646))
5、solr
1)啟動solr(node1+node2+node3)# /usr/local/solr/bin//solr start -z 192.168.57.11:2181,192.168.57.12:2181,192.168.57.13:2181 -force
2)創建索引# /usr/local/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost 192.168.57.11:2181,192.168.57.12:2181,192.168.57.13:2181 -cmd upconfig -confdir /usr/local/solr/server/solr/configsets/sample_techproducts_configs/conf -confname myconf
3)ADD connection# /usr/local/solr/bin/solr create -c collection1 -n collection1 -shards 1 -replicationFactor 3 -p 8983 -force
4)訪問就可以了
solr7.5+zookeeper3.4.12+jdk1.8+zkui