elasticsearch 2.4.6 集群+kibana 4.6安装部署学习记录
2017-09-28 17:45
776 查看
转自大数据学习平台:大讲台: http://www.dajiangtai.com/course/search.do?search=elastic
首先需要说明的是,在es 5.0之前,es与kibana的不同版本号的版本之间会有兼容性问题,但是es 5.0开始,统一了版本号,相同版本号的版本是兼容的。
主要修改以下配置:
#集群名称
cluster.name: escluster
#当前节点名称(每个节点各不相同)
node.name: node-2
#数据及日志目录
path.data: /home/hadoop/data/elasticsearch/data
path.logs: /home/hadoop/data/elasticsearch/logs
#当前节点ip或者hostname(每个节点各不相同)
network.host: 192.168.174.22
#http交互端口
http.port: 9200
# --------------------------------- Discovery ----------------------------------
#集群节点发现机制配置
#不使用默认的组播方式,改用单播方式(Point to Point)
discovery.zen.ping.multicast.enables: false
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
#单播的目标节点的ip或者hostname
discovery.zen.ping.unicast.hosts: ["192.168.174.20", "192.168.174.21", "192.168.174.22"]
执行 bin/plugin install license --verbose,安装license(注意是license不是licence)
执行 bin/plugin install marvel-agent --verbose
执行bin/plugin
install mobz/elasticsearch-head
(集群管理工具、数据可视化、增删改查工具)
http://192.168.174.20:9200
#查看集群状态,注意集群状态是green时,才是正常,如果red或yellow则需要排查下哪里有问题
es的集群所有节点地位平等,所以以下命令在哪台机器上都可以执行(只要安装了插件)
http://192.168.174.20:9200/_cluster/health?pretty
通过head插件提供的可视化web管理界面查看:
http://hadoop01:9200/_plugin/head/
7、启动命令的参数:
bin/elasticsearch -d (后台启动)
bin/elasticsearch -d -p ../pid (保存进程号到pid文件)
插件安装成功后可以在installedPlugins目录下看到
发现了一个更详细的教程,传送门:
http://www.sojson.com/blog/85.html
首先需要说明的是,在es 5.0之前,es与kibana的不同版本号的版本之间会有兼容性问题,但是es 5.0开始,统一了版本号,相同版本号的版本是兼容的。
一、节点规划
host | elasticsearch | kibana |
hadoop01(192.168.174.20) | 安装 | 安装 |
hadoop01(192.168.174.21) | 安装 | 不安装 |
hadoop01(192.168.174.22) | 安装 | 不安装 |
二、安装es
首先在节点hadoop01上安装配置,完成后再复制到另外两台机器上1、下载es的历史版本之一:elasticsearch 2.4.6:
下载历史版本的入口:https://www.elastic.co/downloads/past-releases2、解压缩后,修改conf/elasticsearch.yml文件
注意.ynl文件的格式要求非常严格,每行必须顶格(行开头不能有空格),配置项的值前面必须有个空格,例如:name: value(:与value之前必须有空格)主要修改以下配置:
#集群名称
cluster.name: escluster
#当前节点名称(每个节点各不相同)
node.name: node-2
#数据及日志目录
path.data: /home/hadoop/data/elasticsearch/data
path.logs: /home/hadoop/data/elasticsearch/logs
#当前节点ip或者hostname(每个节点各不相同)
network.host: 192.168.174.22
#http交互端口
http.port: 9200
# --------------------------------- Discovery ----------------------------------
#集群节点发现机制配置
#不使用默认的组播方式,改用单播方式(Point to Point)
discovery.zen.ping.multicast.enables: false
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
#单播的目标节点的ip或者hostname
discovery.zen.ping.unicast.hosts: ["192.168.174.20", "192.168.174.21", "192.168.174.22"]
3、复制到另外两台机器
将配置好的elasticsearch整个文件夹通过scp命令,复制到集群的另外两台机器上去,然后分别修改配置文件4、安装插件:
没个节点上都执行以下命令:执行 bin/plugin install license --verbose,安装license(注意是license不是licence)
执行 bin/plugin install marvel-agent --verbose
执行bin/plugin
install mobz/elasticsearch-head
(集群管理工具、数据可视化、增删改查工具)
5、通过bin/elasticsearch命令启动三个节点(每个节点都执行)
[2017-09-28 17:01:49,887][INFO ][marvel.agent.exporter ] [node-0] skipping exporter [default_local] as it isn't ready yet [2017-09-28 17:01:59,888][INFO ][marvel.agent.exporter ] [node-0] skipping exporter [default_local] as it isn't ready yet [2017-09-28 17:02:09,889][INFO ][marvel.agent.exporter ] [node-0] skipping exporter [default_local] as it isn't ready yet [2017-09-28 17:02:10,146][WARN ][discovery ] [node-0] waited for 30s and no initial state was set by the discovery [2017-09-28 17:02:10,163][INFO ][http ] [node-0] publish_address {192.168.174.20:9200}, bound_addresses {192.168.174.20:9200} [2017-09-28 17:02:10,163][INFO ][node ] [node-0] started |
6、web查看节点及集群状态:
#查看hadoop01上的节点状态;http://192.168.174.20:9200
{ "name" : "node-0", "cluster_name" : "escluster", "cluster_uuid" : "FQBrEEN3SOiq6z8gNI5tHQ", "version" : { "number" : "2.4.6", "build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd", "build_timestamp" : "2017-07-18T12:17:44Z", "build_snapshot" : false, "lucene_version" : "5.5.4" }, "tagline" : "You Know, for Search" } |
es的集群所有节点地位平等,所以以下命令在哪台机器上都可以执行(只要安装了插件)
http://192.168.174.20:9200/_cluster/health?pretty
{ "cluster_name" : "escluster", "status" : "green", "timed_out" : false, "number_of_nodes" : 3, "number_of_data_nodes" : 3, "active_primary_shards" : 4, "active_shards" : 8, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 100.0 } |
http://hadoop01:9200/_plugin/head/
7、启动命令的参数:
bin/elasticsearch -d (后台启动)
bin/elasticsearch -d -p ../pid (保存进程号到pid文件)
三、安装kibana
1、 下载kibana的4.6.0版本
2、解压缩后,修改conf/kibana.yml的配置项elasticsearch.url
elasticsearch.url: http://hadoop01:92003、安装插件
执行 bin/kibana plugin --install elasticsearch/marvel/latest插件安装成功后可以在installedPlugins目录下看到
4、启动kibana:
执行kibana下bin/kibana 即可5、通过kibana查看es集群的各个节点的详细状态,及索引数据信息:http://192.168.174.20:5601
如果查看marvel时,提示no data 。。,有可能节点时间没同步,可以通过ntpdate 同步下节点时间,再查看发现了一个更详细的教程,传送门:
http://www.sojson.com/blog/85.html
相关文章推荐
- elasticsearch 2.4.6+kibana 4.6集群安装
- ElasticSearch学习笔记-集群安装部署
- CentOS6.5下redis安装部署配置指南、常用命令、主从同步集群、redis-php学习资料整合详解
- 【Ceph学习之一】Centos7上部署Ceph存储集群以及CephFS的安装
- Elasticsearch学习记录(1.安装,简单的查询,聚合,防止数据重复,冲突控制等)
- Elasticsearch2.4学习(二)------Elasticsearch2.4.1集群部署及elasticsearch.yml配置
- Elasticsearch学习(1)之安装部署(单机多节点模式)
- ElasticSearch elasticsearch-servicewrapper 在linux上的安装部署全程记录
- ElasticSearch 5学习(1)——安装Elasticsearch、Kibana和X-Pack
- Elasticsearch5.0.1 + Kibana5.0.1 + IK 5.0.1安装记录
- elasticsearch5.0集群+kibana5.0+head插件插件的安装
- Ceph学习1——Ubuntu12.04手动安装Ceph&&部署Ceph集群
- elasticsearch 集群安装部署
- Ambari学习2_ Ambari 2.1安装HDP2.3.2 之 六、安装部署HDP集群 详细步骤
- 使用 Docker 部署和迁移多节点的 ElasticSearch-Logstash-Kibana 集群
- elasticsearch2.3安装以及集群部署
- ElasticSearch学习26_【入门】安装Elasticsearch5.0 部署Head插件
- ElasticSearch学习10_ElasticSearch安装部署说明
- elasticsearch 集群的安装部署
- ElasticSearch2.2 集群安装部署