这里用的系统版本是CentOS6.6。

192.168.3.56    ES01
192.168.3.49    ES02
192.168.3.57    ES03

1、为三个节点安装java环境

# yum install -y java java-1.8.0-openjdk-devel
# vim /etc/profile.d/java.sh
export JAVA_HOME=/usr
# source /etc/profile.d/java.sh

2、同步时间

# ntpdate pool.ntp.org

3、上官网下载rpm包,或者按照guide设置官方repo,分别为三个节点安装ES

# yum install -y elasticsearch-5.4.1.rpm

https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html

4、修改配置文件

节点1,ES01:

# vim /etc/elasticsearch/elasticsearch.yml
cluster.name: oupenges
node.name: es01
bootstrap.system_call_filter: false
http.cors.enabled: true
http.cors.allow-origin: "*"
bootstrap.memory_lock: true
network.host: 192.168.3.56
discovery.zen.ping.unicast.hosts: ["192.168.3.56", "192.168.3.49", "192.168.3.57"]

节点2,ES02:

# vim /etc/elasticsearch/elasticsearch.yml
cluster.name: oupenges
node.name: es02
bootstrap.system_call_filter: false
http.cors.enabled: true
http.cors.allow-origin: "*"
bootstrap.memory_lock: true
network.host: 192.168.3.49
discovery.zen.ping.unicast.hosts: ["192.168.3.56", "192.168.3.49", "192.168.3.57"]

节点3,ES03:

# vim /etc/elasticsearch/elasticsearch.yml
cluster.name: oupenges
node.name: es03
bootstrap.system_call_filter: false
http.cors.enabled: true
http.cors.allow-origin: "*"
bootstrap.memory_lock: true
network.host: 192.168.3.57
discovery.zen.ping.unicast.hosts: ["192.168.3.56", "192.168.3.49", "192.168.3.57"]

两个http参数的含义可以参考这里:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html

5、修改limits.conf,系统默认的1024太小,这里需要至少2048才能启动服务

# vim /etc/security/limits.conf
*               hard    nofile  65536
*               soft    nofile  65536
*               hard    memlock unlimited
*               soft    memlock unlimited
elasticsearch   hard    nproc   514834
elasticsearch   soft    nproc   514834

https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#limits.conf
https://www.elastic.co/guide/en/elasticsearch/reference/current/_memory_lock_check.html

6、启动服务

# service elasticsearch start
# chkconfig elasticsearch on

7、通过cluster API查看集群状态:

# curl -XGET 'http://192.168.3.56:9200/_cluster/health?pretty=true'
{"cluster_name" : "oupenges","status" : "green","timed_out" : false,"number_of_nodes" : 3,"number_of_data_nodes" : 3,"active_primary_shards" : 71,"active_shards" : 142,"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
}

8、安装head插件(需要事先安装nodejs和phantomjs,这里只说一下phantomjs)

安装phantomjs:

# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
# tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
# cd phantomjs-2.1.1-linux-x86_64/
# ln -sv /root/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/

运行head:

# git clone https://github.com/mobz/elasticsearch-head.git
# cd elasticsearch-head/# npm install
# nohup npm run start &

默认监听9100端口,用浏览器访问:http://192.168.3.56:9100/

转载于:https://www.cnblogs.com/keithtt/p/7058958.html

安装elasticsearch5.4.1集群和head插件相关推荐

  1. ElasticSearch-5.3.1集群环境搭建,安装ElasticSearch-head插件,安装错误解决

    说起来甚是惭愧,博主在写这篇文章的时候,还没有系统性的学习一下ES,只知道可以拿来做全文检索,功能很牛逼,但是接到了任务不想做也不行, leader让我搭建一下分布式的ES集群环境,用来支持企业信用数 ...

  2. 服务器群装系统,手把手教你安装及配置服务器集群系统

    今天,我们方案大家谈的经销商为我们提供了安装及配置服务器集群系统的详细步骤.下面,我们来手把手的教您配置服务器集群系统吧! 1.集群服务器安装及配置: 步骤 节点1 节点2 存储 注释 安装配置系统 ...

  3. 从零开始在ubuntu上安装和使用k8s集群及报错解决

    文章目录 安装docker 安装kubernetes 配置k8s集群 配置虚拟机网络 配置Master节点的k8s网络 拉取k8s需要的镜像 启动 kubeadm 和 kubelet 配置 node节 ...

  4. redis伪集群安装linux,redis伪集群搭建(亲测无坑)

    一.单机版安装部署,伪集群只需要操作前1-8步即可,再往下浏览找到:二.单机版-伪集群  安装部署继续搭建,如需设置密码参照第10步 1.安装基本工具 yum install -y gcc-c++ v ...

  5. 安装windows2003+SQL Server2005集群

    安装windows2003+SQL Server2005集群 需求场景 许多企业采用了SQL Server提供业务系统后台数据服务,以及Exchange Server提供办公系统后台协作服务,随着企业 ...

  6. 【Nutch2.3基础教程】集成Nutch/Hadoop/Hbase/Solr构建搜索引擎:安装及运行【集群环境】

    1.下载相关软件,并解压 版本号如下: (1)apache-nutch-2.3 (2) hadoop-1.2.1 (3)hbase-0.92.1 (4)solr-4.9.0 并解压至/opt/jedi ...

  7. Centos7.4 安装elasticsearch6.1.3集群部署

    Centos7.4 安装elasticsearch6.1.3集群部署 安装elasticsearch 1.依赖环境安装 这里使用的java 是1.8.0_77的版本.使用的是rpm 安装包的形式进行部 ...

  8. 使用kubeadm安装kubernetes高可用集群

    kubeadm安装kubernetes高可用集群搭建  第一步:首先搭建etcd集群 yum install -y etcd 配置文件 /etc/etcd/etcd.confETCD_NAME=inf ...

  9. 在Docker中安装和部署MongoDB集群

    在Docker中安装和部署MongoDB集群 - tianshidan1998 - 博客园

最新文章

  1. 如何显示已上演的更改?
  2. 北大率先官宣朱松纯加盟,现身燕园,任职AI研究院院长,“AI发展离不开哲学思考”...
  3. 让FFMPEG支持实时流“伴随”转码
  4. python获取图片的颜色信息
  5. 区块链BaaS云服务(38)点存DCpool分布式存储
  6. Collections.toArray方法使用的坑
  7. tar打包时排除一些文件或者目录
  8. Mongo DB命令简介
  9. 多台或者集群环境下如何保证spring定时器只执行一个
  10. 5道经典面试题【转载】
  11. VMware vSphere中资源池介绍
  12. 1元课,学会小学数学应用题,你的孩子也能秒解“鸡兔同笼”
  13. linux中如何查看文件上下文,linux通过grep根据关键字查找日志文件上下文
  14. ecshop + 主从 + memcache + memcache监控
  15. 字符编码的概念(UTF-8、UTF-16、UTF-32都是什么鬼)
  16. 计算机的用途英语作文带翻译,关于计算机的英文作文带翻译
  17. 有赞,我们来谈谈尊重和感恩员工
  18. H3C路由技术笔记——Policy-Based-Route
  19. C语言0x6c等于多少,6个变态的C语言Hello World程序——更好的理解C
  20. 基于Spark+Hadoop+Java电商网店店铺回头客分析预测

热门文章

  1. java.io.FileNotFoundException: class path resource [springmvc.xml] cannot be opened
  2. 您必须有下列压缩分卷才能继续解压
  3. 看看牛人们是怎么评价编程语言的
  4. 【译】Jumping into Solidity — The ERC721 Standard (Part 2)
  5. 揭开知识库问答KB-QA的面纱2·语义解析篇
  6. 区块链去中心化有那么有用吗?
  7. Distributed Systems笔记-Cryptographic Protocols
  8. mysql数据库用hs_MySQL数据库安装步骤
  9. android mvp简书,Android_MVP学习
  10. mysql 数据类型 decimal_mysql decimal、numeric数据类型