8、ElasticSearch 分布式集群安装部署


 

ES规划

ES环境配置

JDK安装

ES集群安装部署

X-Pack安装

Kibana安装

 

 

 1、修改es配置文件

cluster.name: yunwei-es      都一样

node.name:  master  每台节点都不一样

path.data:/home/es/data/es6.6/data    都一样

path.logs: /home/es/data/es6.6/datalog    都一样

network.host:  192.168.20.210    每台节点都不一样

node.master: true         每个节点  都可以做master,也可以作为data

node.data: true          

discovery.zen.ping.unicast.hosts:["192.168.20.210","***"]     选举master

discovery.zen.ping_timeout: 10s

discovery.zen.minimum_master_nodes: 3      阻止 脑裂  ,通过大多数节点的配置(总结点数的一半以上)

 2、启动集群内的所有节点

./bin/elasticsearch

 

 

 

 

 X-PACK安装 (每个都装)

X-pack是一个elastic  stack 的扩展,将安全,警报,监控,报告,图形功能和机器学习包含在一个易于安装的软件包中。

在es5.0.0之前,必须安装单独的shield,watcher 和marvel插件才能获得在X-oack中所有的功能。

X-pack提供以下几个级别保护elastic集群;

1、安全防护功能,不想让别人直接访问你的5601,9200端口

2、实时监控功能,实时监控集群的CPU,磁盘等负载

3、生成报告功能,图形化展示你的集群使用情况

4、高级功能:包含机器学习等。

 

6.6以后,默认安装
./bin/elasticsearch-plugin install x-pack

该插件收费(30天试用)

 

curl -H "Content-Type: application/json" -XPOST http://192.168.81.131:9200/_xpack/license/start_trial?acknowledge=true

 

开启安全防护,编辑es配置文件

xpack.security.enabled: true

重启
./bin/elasticsearch-setup-passwords interactive   设置用户名和密码

 

 

 Kibana安装  (依赖x-pack,master安装)

 

 

wget https://artifacts.elastic.co/downloads/kibana/kibana-6.6.1-linux-x86_64.tar.gz
tar -zxf kibana-6.6.1-linux-x86_64.tar.gz 
cd kibana-6.6.1-linux-x86_64/
vim ./config/kibana.yml

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://192.168.81.131:9200"]
elasticsearch.username: "elastic"
elasticsearch.password: "123456"
./bin/kibana
启动

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM