Installing SolrClould

1. create /solr in zookeeper (in zkCli: create /solr solr_dir
2. edit $TOMCAT_HOME/conf/server.xml, following the book "apache_solr_4_cookbook", p11
3. edit $TOMCAT_HOME/bin/setenv.sh
(set JAVA_OPTS="$JAVA_OPTS -DzkClientTimeout=20000 -DzkHost=localhost:2181/solr"
4. create file $TOMCAT_HOME/conf/Catalina/localhost/solr.xml, add contents (p11
5. create solr data folder, copy solr.xml from example and edit (remove core
6. copy *.* in example/lib/ext to $TOMCAT_HOME/lib
7. start tomcat
8. config & start solr in all machines


9. upload collection configs


~/Java/solr-4.3.0/example/cloud-scripts$ ./zkcli.sh -z localhost:2181/solr -cmd upconfig -d ../multicore/core0/conf -n excoll0


~/Java/solr-4.3.0/example/cloud-scripts$ ./zkcli.sh -z localhost:2181/solr -cmd upconfig -d ../multicore/core1/conf -n excoll1


10. create collections


http://localhost:58080/solr/admin/collections?action=CREATE&name=excoll0&numShards=2&replicationFactor=2&maxShardsPerNode=2


http://localhost:58080/solr/admin/collections?action=CREATE&name=excoll1&numShards=2&replicationFactor=2&maxShardsPerNode=2




additional:


1. install tomcat native library 1.1.27

sudo apt-get install libapr1-dev libssl-dev


In the jni/native runs:


./configure --with-apr=/usr/bin/apr-1-config \
                --with-java-home=$JAVA_HOME \
                --with-ssl=yes \
                --prefix=/home/luyi/Java/apache-tomcat-7.0.39
make
make install


Edit $CATALINA_HOME/bin/setenv.sh (creating the file if necessary) and add the path to the tc-native libraries to LD_LIBRARY_PATH. Something like:


    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib
    export LD_LIBRARY_PATH

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值