码迷,mamicode.com
首页 > 其他好文 > 详细

solrcloud安装记录

时间:2016-04-05 14:16:31      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:solrcloud   记录   


删除原有openjdk



mkdir /usr/java


tar xzvf jdk-7u79-linux-x64.gz -C /usr/java/


vim /etc/profile


export JAVA_HOME=/usr/java/jdk1.7.0_79


export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH


export PATH=$JAVA_HOME/bin:$PATH


source /etc/profile



vim /etc/hosts


10.10.20.2 solr1

10.10.20.4 solr2

10.10.20.5 solr3


ssh互信


mkdir -p /apps/svr/

mkdir -p /apps/data/zookeeper/

mkdir -p /apps/data/zookeeper/logs/


tar xzvf zookeeper-3.4.8.tar.gz -C /apps/svr/



scp -r /apps/svr/zookeeper-3.4.8 root@solr2:/apps/svr

scp -r /apps/data root@solr2:/apps/data



echo "1" >> /apps/data/zookeeper/myid

echo "2" >> /apps/data/zookeeper/myid

echo "3" >> /apps/data/zookeeper/myid



vim /etc/init.d/zookeeper


#!/bin/bash

#

# chkconfig: 345 30 70

# description: Starts/Stops Apache Zookeeper

  

export ZOO_HOME=/apps/svr/zookeeper-3.4.8

export ZOO_BIN=$ZOO_HOME/bin

export ZOO_SER_BIN=$ZOO_BIN/zkServer.sh

  

$ZOO_SER_BIN $1


chmod +x /etc/init.d/zookeeper

chkconfig --add zookeeper

chkconfig zookeeper on


tar xzf solr-5.5.0.tgz solr-5.5.0/bin/install_solr_service.sh --strip-components=2


./install_solr_service.sh solr-5.5.0.tgz -i /apps/svr -d /apps/data/solrcloud -u solr -s solr -p 8983



vim /apps/data/solrcloud/solr.in.sh


SOLR_JAVA_MEM="-Xms10g -Xmx10g"

ZK_HOST=10.10.20.2:2181,10.10.20.4:2181,10.10.20.5:2181



cp ik-analyzer-solr5-5.x.jar  /apps/svr/solr/server/solr-webapp/webapp/WEB-INF/lib

cp -n /apps/svr/solr/dist/*.jar /apps/svr/solr/server/solr-webapp/webapp/WEB-INF/lib

cp mysql-connector-java-5.1.35.jar /apps/svr/solr/server/lib



su -c ‘/apps/svr/solr/bin/solr create -c c1_cd -d /apps/data/solrcloud/opt/c1_cd_conf -n c1_cd -s 3 -rf 2 -port 8983‘ - solr


http://localhost:8983/solr/admin/collections?action=CREATE&name=core_cd&numShards=2&replicationFactor=3



server/scripts/cloud-scripts/zkcli.sh -zkhost solr1:2181 -cmd makepath /solr


solrcloud安装记录

标签:solrcloud   记录   

原文地址:http://cdtech.blog.51cto.com/8720440/1760350

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!