最近需要搭建一个cloudSolr集群,写下记录。基础环境是在centos6.5 64bit
3个下载地址:
1、 下载Solr-4.x http://lucene.apache.org/solr/downloads.html
2、下载Tomcat http://tomcat.apache.org/download-70.cgi
3、下载Zookeeper http://zookeeper.apache.org/releases.html
1、zookeeper
zookeeper的安装比较简单
记得关闭防火墙,否则会提示启动失败(重要) chkconfig iptables off 重启后生效 在zoo.cfg配置文件中 tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/home/hadoop/package/zookeeper-3.4.5/data # the port at which the clients will connect clientPort=2181 server.1=192.168.0.146:2888:3888 server.2=192.168.0.142:2888:3888 server.3=192.168.0.145:2888:3888 需要修改的: dataDir=/home/hadoop/package/zookeeper-3.4.5/data 里需要创建一个myid文件里面的值是配置文件中server.后的值 如:server.1=192.168.0.146:2888:3888 里面的值是1
tomcat 目录下bin的
配置文件
JAVA_OPTS = "
-DzkHost=192.168.0.157:2181,192.168.0.158:2181,192.168.0.159:2181
-Dbootstrap_confdir=/home/hadoop/package/solrhome/collection1/conf -Dcollection.configName=myconf
-Dbootstrap_conf=true
-DnumShards=2"
set JAVA_OPTS = -DzkHost=192.168.0.157:2181,192.168.0.158:2181,192.168.0.159:2181
时间: 2024-11-05 16:38:28