redhat6.4 elasticsearch1.7.3安装配置
利用elasticsearch管理集群索引, 今天刚好需要重新调整elasticsearch的最大内存, 所以自己安装了练手
附件: elasticsearch
附带head插件完整版(在用):elasticsearch-1.7.3.tar.gz, 密码:5g7o
1.下载后直接解压修改配置文件
tar -zxvf elasticsearch-1.7.3.tar.gz
我是解压后直接扔到/usr/local下面 然后进入config下,修改elasticsearch.yml 下面是需要修改的内容 cluster.name: elasticsearch
#这是集群名字,我们 起名为 elasticsearch。es启动后会将具有相同集群名字的节点放到一个集群下。 node.name: "es-node1"
#节点名字。 covery.zen.minimum_master_nodes: 2
#指定集群中的节点中有几个有master资格的节点。对于大集群可以写3个以上。 discovery.zen.ping.timeout: 40s #默认是3s,这是设置集群中自动发现其它节点时ping连接超时时间,为避免因为网络差而导致启动报错,我设成了40s。 discovery.zen.ping.multicast.enabled: false
#设置是否打开多播发现节点,默认是true。 network.bind_host: 192.168.137.100
#设置绑定的ip地址,这是我的master虚拟机的IP。 network.publish_host: 192.168.137.100
#设置其它节点和该节点交互的ip地址。 network.host: 192.168.137.100
#同时设置bind_host和publish_host上面两个参数。 transport.tcp.port: 9300 # Enable compression for all communication between nodes (disabled by default):
#
#transport.tcp.compress: true # Set a custom port to listen for HTTP traffic:
#
http.port: 9200 discovery.zen.ping.unicast.hosts: ["192.168.137.100", "192.168.137.101","192.168.137.100:9301"]
#discovery.zen.ping.unicast.hosts:["节点1的 ip","节点2 的ip","节点3的ip"]
2.运行&关闭
跑到elasticsearch 的bin里面 前台运行
./elasticsearch -Xms512m -Xmx512m 后台运行
./elasticsearch -d -Xms512m -Xmx512m Xms与Xmx有什么区别呢
Xms启动栈大小
Xmx程序使用的最大内存 关闭的话
前台肯定就是CTRL+C
后台就kill pid吧
3.访问
ip+port 前提是要iptables放开9200端口通行
我一般用下面这句
iptables -I INPUT -p tcp --dport 9200 -j ACCEPT
然后保存规则
service iptables save
重启防火墙
service iptables restart 然后浏览器访问:
4.安装插下面演示在线安装与离线安装在线安装:跑到elasticsearch的bin下面
(1)安装head插件
./plugin -install mobz/elasticsearch-head (2)安装bigdesk
./plugin -install lukas-vlcek/bigdesk 安装完成后会在elasticsearch目录下生成plugins这么一个文件夹 离线安装:
自己下载head插件, 就是上面的elasticsearch-head-master.zip, 然后在elasticsearch目录下建一个plugins/head文件夹, 把下载好的插件解压扔进plugins/head里面, ok!
再访问一下
连接地址:http://192.168.158.128:9200/_plugin/head/

下面介绍一下集群环境

这是一个Elasticsearch集群, 下面的是在一台机器上部署了两个Elasticsearch, 如果需要实现在一台机器上部署多个Elasticsearch, 只需要把配置文件中的bootstrap.mlockall: true注释掉即可, 如果开放这个属性在一对多的情况下会启动失败, 具体原因不详, 可能跟jdk有啥冲突之类的。
然后就是端口与防火墙的问题,下面是我使用的详情
192.168.158.128 9200 9300
192.168.158.131 9200 9300
192.168.158.131_2 9201 9301
防火墙的话记得添加规则,由于我这里使用的是redhat跟fedord, 一个是iptables和firewall
iptables:
iptables -I INPUT -p tcp --dport 9300 -j ACCEPT
iptables -I INPUT -p tcp --dport 9200 -j ACCEPT
firewall:
firewall-cmd --permanent --zone=public --add-port=9201/tcp
firewall-cmd --permanent --zone=public --add-port=9301/tcp
端口自行更改。还有就是udp的问题, 如需放开udp则
firewall-cmd --permanent --zone=public --add-port=9201/udp
或者直接干掉防火墙(不推荐)。
service iptables stop
systemctl stop firewalld.service
部署好后全部启动, 然后Elasticsearch会自动寻找同一网段的es节点。

在某种情况下, 比如现在的master是node_131, 当他挂掉后, Elasticsearch会自动竞选出最佳master节点

当之前的node_131恢复后,没有跳回, 防止脑裂!

redhat6.4 elasticsearch1.7.3安装配置的更多相关文章
- elk集成安装配置
三台虚拟机 193,194,195 本机 78 流程 pythonserver -> nginx -> logstash_shipper->kafka->logstash_in ...
- ElasticSearch集群安装配置
1. 环境说明 Cent OS 7 jdk-8u121-linux-x64.tar.gz elasticsearch-5.2.1.zip 2. 系统环境配置 新建进程用户 修改File Descrip ...
- zabbix安装配置
实验环境 主机名 操作系统版本 IP地址 安装软件 console CentOS 7.0 114.55.29.246 Httpd.Nginx.MySQL.Zabbix log1 CentOS 7.0 ...
- mysql group replication 安装&配置详解
一.原起: 之前也有写过mysql-group-replication (mgr) 相关的文章.那时也没有什么特别的动力要写好它.主要是因为在 mysql-5.7.20 之前的版本的mgr都有着各种各 ...
- Elasticsearch安装配置和测试
官方教程:https://www.elastic.co/guide/en/elasticsearch/reference/master/_installation.html 中文教程:https:// ...
- Hive安装配置指北(含Hive Metastore详解)
个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...
- Hive on Spark安装配置详解(都是坑啊)
个人主页:http://www.linbingdong.com 简书地址:http://www.jianshu.com/p/a7f75b868568 简介 本文主要记录如何安装配置Hive on Sp ...
- ADFS3.0与SharePoint2013安装配置(原创)
现在越来越多的企业使用ADFS作为单点登录,我希望今天的内容能帮助大家了解如何配置ADFS和SharePoint 2013.安装配置SharePoint2013这块就不做具体描述了,今天主要讲一下怎么 ...
- Hadoop的学习--安装配置与使用
安装配置 系统:Ubuntu14.04 java:1.7.0_75 相关资料 官网 下载地址 官网文档 安装 我们需要关闭掉防火墙,命令如下: sudo ufw disable 下载2.6.5的版本, ...
随机推荐
- cordova-ios 升级到4.4.0 无法真机跑iOS8 报错: dyld`dyld_fatal_error: -> 0x120085088 <+0>: brk #0x3
项目进入测试阶段,马上要上线了,同事拿了自己的iOS8系统5s跑真机,无缘无故报错,之前跑她的手机完全没有问题的.Xcode 8.x中最低部署版本是iOS8.0,按理说完全能够跑真机的. 但是报了一个 ...
- 源码 mongod.lock shutdown
https://github.com/mongodb/mongo/blob/master/src/mongo/db/db.cpp 1. 退出原理 /proc/" << pid 判 ...
- a new way of thinking about a problem
PHP Advanced and Object-Oriented Programming Larry Ullman The first thing that you must understand ...
- grub24dos
Grub24Dos是个很好的软件,可用于Windows与Linux双系统的安装的工具.注意不是那个Grub4Dos.使你不必依赖于任何Linux分区启动您的计算机的可用性.在Windows MBR没有 ...
- IO、NIO、AIO理解
摘要: 关于BIO和NIO的理解 最近大概看了ZooKeeper和Mina的源码发现都是用Java NIO实现的,所以有必要搞清楚什么是NIO.下面是我结合网络资料自己总结的,为了节约时间图示随便画的 ...
- Python性能鸡汤(转)
英文原文:http://blog.monitis.com/index.php/2012/02/13/python-performance-tips-part-1/ 英文原文:http://blog.m ...
- 查询删除安装rpm -qa | grep -i wrapname
查询:rpm -qa | grep -i wrapname 删除:sudo rpm -ev wrapname 删除依赖:sudo rpm -ev --nodeps mysql-libs-5.6.60- ...
- Failed to load project at 'xxx.xcodeproj', incompatible project version。
Failed to load project at 'xxx.xcodeproj', incompatible project version. 更新最新的xcode,xcode高版本可以打开低版本的 ...
- 阿里云安装docker 指定版本
sh docker-install.sh 1.12.6 #ubuntu16.4 测试通过 #!/bin/sh set -e # # This script is meant for quick &am ...
- [LeetCode] 172. Factorial Trailing Zeroes_Easy tag: Math
Given an integer n, return the number of trailing zeroes in n!. Example 1: Input: 3 Output: 0 Explan ...