首页 > 其他 > 详细

solr +zookeeper+tomcat 集群搭建

时间:2015-08-07 19:08:13      阅读:233      评论:0      收藏:0      [点我收藏+]

最近需要搭建一个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

solr +zookeeper+tomcat 集群搭建

原文:http://www.cnblogs.com/zhanggl/p/4711225.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!