OneCoder Avatar
OneCodercoderli.com · 961 篇博文
Elasticsearch 集群部署说明📷 题解插图

Elasticsearch 集群部署说明

📅 2016-08-15·✍️ OneCoder·计算中...·⏱️ 3 分钟
#Elasticsearch

记录Elasticsearch集群搭建的过程。

安装JDK 8

官方推荐的版本是1.8.0_73 以上。因此首先安装jdk。安装之前下载的jdk-8u77版

Bash 1 行
rpm -i jdk-8u77-linux-x64.rpm

安装ElasticSearch

下载安装包

Bash 1 行
curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.5/elasticsearch-2.3.5.tar.gz

解压

Bash 1 行
tar -xvf elasticsearch-2.3.5.tar.gz

修改config/elasticsearch.yml配置文件

YAML 6 行
cluster.name: es-dps-cluster
#节点名
node.name: es-node4
network.host: ip
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts:["10.200.48.17","10.200.48.18","10.200.48.19","10.200.48.20"]

启动

Bash 2 行
cd elasticsearch-2.3.5/bin
ES_JAVA_OPTS="-Xms10g -Xmx10g" nohup ./elasticsearch >/dev/null 2>&1 &

注意,不能以root身份启动。

验证部署

Bash 2 行
curl 'localhost:9200/_cat/health?v'
curl 'localhost:9200/_cat/nodes?v'

安装elasticsearch-head 监控插件

Bash 1 行
plugin install mobz/elasticsearch-head
💡 OneCoder 资源指引

所有代码开源上传至 GitHub:yummy-code 仓库 · GESP 专题站:GESP WIKI

🤝 技术交流与答疑

欢迎加入:C++ GESP/CSP 考级答疑群(688906745)Java/Python交流群(982860385),点击可直接加群。

📚

猜你想读 · 相关文章推荐

OneCoder

OneCoder (lihongzheshuai)

一个中年人的自留地,记录学习 C++、GESP/NOI、Java、Python 与算法架构的心得体会。本站唯一网址:coderli.com

读者讨论与留言

0 条讨论
✨ 支持点击留言直接回复 · Markdown 引用格式
💬 还没有读者留言,快来成为第一个讨论者吧!