虽然不是很有技术含量的事情,主要依靠的是阅读能力,然而知识的东西还是记录一下,以备后继待查。

环境相关

1. Server:h1,h2,h3

2. OS RHEL 6.2

3. Zookeeper 3.4.6

4. Solr 5.2.1

下载相关

1. Solr 5.2.1

 wget http://archive.apache.org/dist/lucene/solr/5.2.1/solr-5.2.1.zip

2. Zookeeper 3.4.6

 wget http://mirror.nexcess.net/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz

Zookeeper安装

Quick Start https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html

MultiServer https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup

最后在h1、h2、h3上安装并启动了Zookeeper。

SolrCloud安装

1. 在h1上解压下载的zip文件,命名为solr-5.2.1

2. 拷贝样例,作为新节点的solr-home

 cp -r solr-5.2./server/solr solr-node-

3. 在h2、h3上进行类似的操作

最后在h1、h2、h3上分别有solr-node-1、solr-node-2、solr-node-3,以及solr-5.2.1

SolrCloud启动

使用solr的zkcli.sh创建一个solr的Zookeeper路径

 solr-5.2./server/scripts/cloud-scripts/zkcli.sh -zkhost h1: -cmd makepath /solr

启动solr-node-1节点:-z 指定zk地址;-s 指定solr-home位置;-p 指定启动端口

 solr-5.2./bin/solr -z h1:,h2:,h3:/solr -s solr-node-/solr -p 

相应的启动其他节点;查看集群状态

 curl "http://localhost:8983/solr/admin/collections?action=clusterstatus&wt=json"

Collection创建

1. 拷贝样例,作为配置基础

 cp -r solr-5.2./server/solr/configsets/sample_techproducts_configs my_configs

2. 根据需要增加schema.xml中的field配置

3. 上传配置到Zookeeper

 ./solr-5.2./server/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost h1:/solr -confname my_configs -confdir ~/zrss/my_configs/conf/

4. 将配置与Collection链接

./solr-5.2./server/scripts/cloud-scripts/zkcli.sh -cmd linkconfig -collection my_configs -confname my_configs -z h1:/solr

相关文档

https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files

https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities

5. 创建Collection

curl "http://localhost:8983/solr/admin/collections?action=CREATE&name=demo_collection&numShards=2&replicationFactor=2&configName=my_configs"

过程中学习到的几个常用linux命令

查看端口被进程占用情况

lsof -i:PORT

查看进程启动位置

lsof -p PID | grep cwd

查看进程占用的端口号

netstat –nltp | grep PID

SolrCloud 5.2.1 installation and configuration的更多相关文章

  1. P6 EPPM Installation and Configuration Guide 16 R1 April 2016

    P6 EPPM Installation and Configuration Guide 16 R1         April 2016 Contents About Installing and ...

  2. P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1

    P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1       May ...

  3. installation and configuration of OpenCV4Android SDK

    http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#running-opencv ...

  4. !! This tutorial was designed to help you with installation and configuration of OpenCV4Android SDK.

    ref: http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#running-o ...

  5. HHVM Installation and Configuration(HHVM 安装及配置)

    Installation and Configuration¶ General Installation Considerations Installation on Linux systems Ub ...

  6. SharePoint 2013 Installation and Configuration Issues

    # Issue 1: During Installing SharePoint 2013 Prerequisites there was an error in installing Applicat ...

  7. Installation and Configuration MySQL Cluster 7.2 on CentOS 5 (include MySQL 5.5)

    Architecture Manager Node mysql-mag1   192.168.1.31 mysql-mag2   192.168.1.32 SQL Node mysql-sql1   ...

  8. HAProxy Installation and Configuration on CentOS 6.4 to Mitigate The Effects of Abusive Clients--转

    ref:http://thoughts.z-dev.org/2013/05/07/haproxy-installation-and-configuration-on-centos-6-4-to-mit ...

  9. Installation and Configuration Guide

    Harbor can be installed by one of three approaches: Online installer: The installer downloads Harbor ...

随机推荐

  1. SQL - 添加外键

    不解释: ---先创建外键的column ALTER TABLE tblLicenses ADD ProductID int not null; ---添加外键 ALTER TABLE tblLice ...

  2. trigger()和triggerHandler()

    trigger()方法触发事件后,还会执行浏览器的默认事件,例如: $('input').trigger("focus); 这一行代码不仅会触发为<input>元素绑定的focu ...

  3. NDN与TCP/IP

    搬运自http://blog.csdn.net/programmer_at/article/details/49203241  当前TCP/IP协议存在哪些问题?如何改进? 当时没有回答好,然后提到了 ...

  4. SpringMVC 之文件上传 MultipartResolver

    基于前面文章的基础上. 一.准备 需要的jar  二.配置 1.  spmvc-servlet.xml <?xml version="1.0" encoding=" ...

  5. iOS键盘覆盖输入框的处理.doc

    在一个多项输入界面上,会有多个UITextfield类型的输入框.为了滚动方面,我们会将他们一一添加到UITableView的cell中,从而组成一个可以上下滑动的数据输入界面. 但是字符输入是通过系 ...

  6. android 回调机制实例!

    详细实现为在类中定义接口.在接口的实现方法中传入參数(也能够不传). 在调用类中传入新建的接口.并实现未实现的方法. public class CallBackClass { //传入对应的接口作为參 ...

  7. QTimerLine类学习

      QTimeLine类提供了控制动画的时间轴. 类型:enum CurveShape{EaseInCurve,EaseOutCurve,EaseInOutCurve,LinearCurve,Sine ...

  8. Win32 的dll导入

    dll 文件可以导入变量,函数,和C++类,但是导入变量会使执行程序与dll紧耦合,而C++类导入则需要两个文件的开发商所用的编译器相兼容,所以做好只导入函数; 创建dll : 头文件:#ifdef  ...

  9. RESTful Web Services: A Tutorial--reference

    As REST has become the default for most Web and mobile apps, it's imperative to have the basics at y ...

  10. Java基础知识强化88:BigDecimal类之BigDecimal类引入和概述 以及 BigDecimal的使用(加减乘除)

    1. BigDecimal类概述: 由于在运算的时候,float类型和double很容易丢失精度.所以为了能够精确的表达.计算浮点数,Java提供了BigDecimal. BigDecimal:不可变 ...