安装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 ...
随机推荐
- Linux常规命令总结
Linux常规命令总结,仅供参考: 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显 ...
- Metasploit漏洞利用,三个入侵主机实战案例
受害者主机 windows2003 ie模拟工具ietest ie5.5/6/7/ 漏洞:MS10_002,MS10_018,MS12-020 ---------------------------- ...
- “Hello World!”团队第七周召开的第六次会议
博客内容: 一.会议时间 二.会议地点 三.会议成员 四.会议内容 五.todo list 六.会议照片 七.燃尽图 八 .功能说明书 一.会议时间 2017年12月6日 11:20-12:00 二 ...
- mysql和oracle查询出的一条结果中的多个字段拼接
1,mysql concat('a','b','c')和concat_ws('a','b','c')的区别:前者如果有某个值为空,结果为空;后者如果有某个值为空,可以忽略这个控制 SELECT con ...
- iOS开发学习-资源打包
图片是被放到Images.xcassets中 1.部署版本在>=iOS8的时候,打包的资源包中的图片会被放到Assets.car 图片被压缩: 2.部署版本在<iOS8的时候,打包的资源包 ...
- 第五次作业+4505B寝室队
1.需求分析: 作一个简单的MP3播放器,并能显示播放文件的路径. 2.设计思路: 用窗体设计播放器的界面,以市面上主流的播放器为标准,采用一个窗体的界面. 3.实现的功能: 第一是能播放MP3文件, ...
- Git初用心得
第一次使用git,因为之前操作系统的实验需要,在虚拟机中使用过lniux系统,所以对这种用指令输入而不是图形化的程序感觉不是很陌生.感觉git还是很人性化的,git gui就是图形界面,操作起来也不复 ...
- Week4-作业1:阅读与博客
第四章.两人合作 1.原文: 在变量面前加上有意义的前缀,程序员就能一眼看出变量的类型及相应的语义.这就是“匈牙利命名法”的用处.还有一些地方不适合用“匈牙利命名法”,比如,在一些强类型的语言(如C# ...
- Swift-KVC构造函数中数据类型和私有属性
- 安装mysql后遇到的一些问题
我们安装好了mysql(cnetos7上是安装mariadb)后,出现如下图所示的问题,我们可以用netstat -lntup查看以下服务器的端口,mysql的端口一般默认为 3306,查看服务是否启 ...