这里用的系统版本是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/

安装elasticsearch5.4.1集群和head插件的更多相关文章

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

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

  2. windows安装elasticsearch服务以及elasticsearch5.6.10集群的配置(elasticsearch5.6.10配置跟1.1.1的配置不太相同,有些1.1.1版本下的配置指令在5.6.10中不能使用)

    1.下载elasticsearch5.6.10安装包 下载地址为:  https://artifacts.elastic.co/downloads/elasticsearch/elasticsearc ...

  3. 【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 ...

  4. Cloudera Manager安装_搭建CDH集群

    2017年2月22日, 星期三 Cloudera Manager安装_搭建CDH集群 cpu   内存16G 内存12G 内存8G 默认单核单线 CDH1_node9 Server  || Agent ...

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

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

  6. centos7安装redis-4.0.1集群

    试验机操作系统:CentOS Linux release 7.2.1511 (Core) 本文的目的是教会大家快速搭建redis集群,完了再深入学习. 试问如果不上手试验,看的资料再多有个毛用? 下载 ...

  7. Linux系统下安装Redis和Redis集群配置

    Linux系统下安装Redis和Redis集群配置 一. 下载.安装.配置环境: 1.1.>官网下载地址: https://redis.io/download (本人下载的是3.2.8版本:re ...

  8. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.6.集群管理命令

    3.6. 集群管理命令 3.6.1. RAC的启动与关闭 oracle rac默认会开机自启动,如需维护时可使用以下命令: 关闭: crsctl stop cluster 停止本节点集群服务 crsc ...

  9. 完整安装sqlserver always on集群

    准备工作 1.  四台已安装windows server 2008 r2 系统的虚拟机,配置如下: CPU : 1核 MEMORY : 2GB DISK : 40GB(未分区) NetAdapter ...

随机推荐

  1. 苏州地区--校招IT公司

    完整经历了苏州的秋招和春招,在本校和苏州大学跑了许多次的宣讲会,自认为对苏州IT企业的校招有一个充分的认知.原本打算在苏州找一份Java开发的工作,可是发现自己简历连那些公司的简历关都过不去(对双非学 ...

  2. IDEA配置maven中央库

    分两步: STEP :配置maven: STEP :配置IDEA.区分默认配置和项目级配置. STEP 1:maven中央库配置 国内常用的maven库主要是阿里云maven库.华为云maven. 其 ...

  3. 学习笔记 | Github

    Github教程 \(Github\)是个好东西QwQ 存代码不用U盘爸爸妈妈再也不用担心我的U盘弄丢没有备份啦! 创建github账号 创建仓库 输入命令 git clone https://git ...

  4. dvwa学习笔记之xss

    反射型Low 直接输入<script>alert(/xss/)</script>就可以发现弹窗Medium 检查源码 可以看到网站对输入字符进行了过滤,尝试双写绕过,构造< ...

  5. init命令详解

    基础命令学习目录首页 1.手动输入命令会执行相关操作   #init 0 - 停机(千万不能把initdefault 设置为0 )   #init 1 - 单用户模式   #init 2 - 多用户, ...

  6. sprint会议1

    昨天:进行第一次站立会议,讨论冲刺阶段,目标,任务认领,制作索引卡. 今天:准备查找安卓APP开发的有关资料,安装有关软件. 遇到的问题:对这方面毫无了解,不知道怎么开始,从哪开始,完全没经验.

  7. redux相关专业名词及函数提要

    redux: 用来管理react app 状态(state)的一个架构. store: 通过createStore()创建,用来存放state,与react app是完全分离的.createStore ...

  8. mac下使用marsedit写博客

    在Windows习惯了使用Windows live write写好博客,然后发布上去,到了mac下,发现了一个很好的替代品  MarseEdit 下载安装后,打开出现如下解码,选择 I already ...

  9. vue2.0 keep-alive 最佳实战(转载)

    1.基本用法 vue2.0提供了一个keep-alive组件用来缓存组件,避免多次加载相应的组件,减少性能消耗 <keep-alive> <component> <!-- ...

  10. CSS和JS引用图片(资源)的路径问题

    做项目时遇到了这个问题,特此写个笔记记一下