安装elasticsearch5.4.1集群和head插件
这里用的系统版本是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插件的更多相关文章
- ElasticSearch-5.3.1集群环境搭建,安装ElasticSearch-head插件,安装错误解决
说起来甚是惭愧,博主在写这篇文章的时候,还没有系统性的学习一下ES,只知道可以拿来做全文检索,功能很牛逼,但是接到了任务不想做也不行, leader让我搭建一下分布式的ES集群环境,用来支持企业信用数 ...
- 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 ...
- 【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 ...
- Cloudera Manager安装_搭建CDH集群
2017年2月22日, 星期三 Cloudera Manager安装_搭建CDH集群 cpu 内存16G 内存12G 内存8G 默认单核单线 CDH1_node9 Server || Agent ...
- 使用kubeadm安装kubernetes高可用集群
kubeadm安装kubernetes高可用集群搭建 第一步:首先搭建etcd集群 yum install -y etcd 配置文件 /etc/etcd/etcd.confETCD_NAME=inf ...
- centos7安装redis-4.0.1集群
试验机操作系统:CentOS Linux release 7.2.1511 (Core) 本文的目的是教会大家快速搭建redis集群,完了再深入学习. 试问如果不上手试验,看的资料再多有个毛用? 下载 ...
- Linux系统下安装Redis和Redis集群配置
Linux系统下安装Redis和Redis集群配置 一. 下载.安装.配置环境: 1.1.>官网下载地址: https://redis.io/download (本人下载的是3.2.8版本:re ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:3.安装Oracle RAC-3.6.集群管理命令
3.6. 集群管理命令 3.6.1. RAC的启动与关闭 oracle rac默认会开机自启动,如需维护时可使用以下命令: 关闭: crsctl stop cluster 停止本节点集群服务 crsc ...
- 完整安装sqlserver always on集群
准备工作 1. 四台已安装windows server 2008 r2 系统的虚拟机,配置如下: CPU : 1核 MEMORY : 2GB DISK : 40GB(未分区) NetAdapter ...
随机推荐
- SQL Server上DBLINK的创建,其实很简单!(上)
今天给大家来分享一下跨服务器操作数据库,还是以SQL Server的管理工具(SSMS)为平台进行操作. 什么是跨服务器操作? 跨服务器操作就是可以在本地连接到远程服务器上的数据库,可以在对方的数据库 ...
- 前端开发利器 livereload -- 从此告别浏览器F5键
各位从事前端开发的童鞋们,大家每天coding && coding,然后F5 && F5,今天推荐一个静态文件在浏览器中自动更新的扩展 livereload,不同手动刷 ...
- 小刘的深度学习---CNN
前言: 前段时间我在树莓派上通过KNN,SVM等机器学习的算法实现了门派识别的项目,所用到的数据集是经典的MNIST.可能是因为手写数字与印刷体存在一些区别,识别率并是很不高.基于这样的情况,我打算在 ...
- 不用U盘,用一台好电脑给另一个电脑重装windows10
先把坏电脑硬盘拆下来,然后挂到好电脑上 把这块盘用系统的磁盘管理工具改成GPT分区表格式,然后整盘分区(NTFS). 再对这个分区进行压缩卷操作,分出第二个区(FAT32格式 大小大于5G 我这里用了 ...
- dazhewang数据库初设计
mysql> use dazhe; Database changed mysql> create table shops(id int primary key auto_increment ...
- Java编写的电梯模拟系统《结对作业》
作业代码:https://coding.net/u/liyi175/p/Dianti/git 伙伴成员:李伊 http://home.cnblogs.com/u/Yililove/ 对于这次作业,我刚 ...
- iOS开发 tableView点击下拉扩展 + 内嵌collectionView上传图片效果
---恢复内容开始--- //需要的效果 1.设置window的根视图控制器为一个UITableViewController #import "AppDelegate.h"#imp ...
- 6/9 sprint2 看板和燃尽图的更新
- 项目复审-Bata阶段
项目复审-Bata阶段 小组的名字和链接 优点 缺点 名次 别看了你没救了 https://www.cnblogs.com/liaoyujun233/p/9148781.html 基本功能都已经实现, ...
- Beta阶段冲刺前准备
第 1 篇 Scrum 冲刺博客 1.新成员 暂无新成员,等一个有缘人 团队成员: 刘阳航(captain) 陈文俊 林庭亦 郑子熙 2.讨论是否需要更换团队的PM 经过团队讨论,我们决定不更换团队P ...