ElasticSearch部署文档(Ubuntu 14.04)
ElasticSearch部署文档(Ubuntu 14.04)
参考链接
- https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html#setup-configuration
- https://www.elastic.co/guide/en/elasticsearch/guide/current/_file_descriptors_and_mmap.html
- https://www.elastic.co/guide/en/elasticsearch/guide/current/_important_configuration_changes.html
- https://github.com/grigorescu/Brownian/wiki/ElasticSearch-Configuration
安装java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
安装ElasticSearch
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/1.6/debian stable main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install elasticsearch
sudo update-rc.d elasticsearch defaults
ElasticSearch各个目录说明
| type | description | location |
|---|---|---|
| home | Home of elasticsearch installation | /usr/share/elasticsearch |
| bin | Binary scripts including elasticsearch to start a node | /usr/share/elasticsearch/bin |
| conf | Configuration files elasticsearch.yml and logging.yml | /etc/elasticsearch |
| conf | Environment variables including heap size,file descriptors | /etc/default/elasticsearch |
| data | The location of the data files | /var/lib/elasticsearch/ |
| logs | Log files location | /var/log/elasticsearch |
| plugins | Plugin files location | /usr/share/elasticsearch/plugins |
配置
# 在/etc/default/elasticsearch中修改:
ES_HEAP_SIZE=4g #不要超过32g,如果整台机器只部署ES,一半内存用于Java heap,另一半给Lucene
cat <<EOF>> /etc/security/limits.conf
elasticsearch - nofile
EOF # 在/etc/default/elasticsearch中修改:
MAX_OPEN_FILES=
Virtual memory
cat <<EOF>> /etc/sysctl.conf
vm.max_map_count=
EOF sysctl -p
# 在/etc/elasticsearch/elasticsearch.yml中修改:
bootstrap.mlockall: true
# 在/etc/default/elasticsearch中修改:
MAX_LOCKED_MEMORY=unlimited
在/etc/elasticsearch/elasticsearch.yml中修改: # 集群名称,同一集群,名称要设置相同
cluster.name: elasticsearch_production
# 节点名称
node.name: elasticsearch_001_data # 数据路径,可配置多个,英文逗号分开,注意目录的权限,保证elasticsearch用户可写
path.data: /path/to/data1,/path/to/data2
# 日志路径,注意目录的权限,保证elasticsearch用户可写
path.logs: /path/to/logs
# 插件路径
path.plugins: /path/to/plugins # 该属性是为了形成一个集群,有主节点资格并互相连接的节点的最小数目
# (number of master-eligible nodes / ) + 。 下面的值是在3个有主节点资格的情况下设定
# 因为节点数,以后可以增加,或者减少,故该配置可以动态修改
discovery.zen.minimum_master_nodes: # 恢复控制
gateway.recover_after_nodes:
gateway.expected_nodes:
gateway.recover_after_time: 5m #关闭多播,用单播。并指定至少一个能接受单播的主机
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["192.168.2.1:9300", "192.168.2.2:9300", "192.168.2.3:9300"]
sudo /etc/init.d/elasticsearch start
# 验证上面一些配置是否配置成功
curl localhost:/_nodes/process?pretty
ElasticSearch部署文档(Ubuntu 14.04)的更多相关文章
- talk命令帮助文档(ubuntu 18.04)
TALK() BSD General Commands Manual TALK() NAME talk — talk to another user SYNOPSIS talk person [tty ...
- mesg命令帮助文档(ubuntu 18.04)
MESG() User Commands MESG() NAME mesg - display (or do not display) messages from other users SYNOPS ...
- write命令帮助文档(ubuntu 18.04)
WRITE() BSD General Commands Manual WRITE() NAME write — send a message to another user SYNOPSIS wri ...
- 如何在 Ubuntu 14.04 上安装 Elasticsearch,Logstash 和 Kibana
介绍 在本教程中,我们将去的 Elasticsearch 麋鹿堆栈安装 Ubuntu 14.04 — — 那就是,Elasticsearch 5.2.x,Logstash 2.2.x 和 Kibana ...
- Ceph分布式存储(luminous)部署文档-ubuntu18-04
Ceph分布式存储(luminous)部署文档 环境 ubuntu18.04 ceph version 12.2.7 luminous (stable) 三节点 配置如下 node1:1U,1G me ...
- Ubuntu 14.04中Elasticsearch集群配置
Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...
- deepsooncms在Ubuntu 14.04上部署教程
deepsooncms在Ubuntu 14.04上部署教程 一.安装mono1.在命令行运行sudo apt-key adv --keyserver keyserver.ubuntu.com --re ...
- Ubuntu 14.04 上使用 Nginx 部署 Laravel
本教程将会涉及以下工具: Ubuntu 14.04 LTS PHP 5.5 MySQL Laravel 5.0 Nginx 参考文章:Ubuntu 14.04 上使用 Nginx 部署 Laravel ...
- 在 Ubuntu 14.04 服务器上部署 Hexo 博客
版权声明:本文由宋秉金 原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/241080001487926962 来源:腾云阁 ...
随机推荐
- angular2 获取到的数据无法实时更新的问题
在修改完组件数据之后调用下面两句: this.changeDetectorRef.markForCheck(); this.changeDetectorRef.detectChanges(); 注入到 ...
- 转:Unable to execute dex: Multiple dex files define 解决方法
转自:http://blog.csdn.net/mxlxiao7/article/details/8978930 问题发生概述: 程序编译正常,在用Eclipse调试执行时,报错Unable to e ...
- 图论&动态规划:虚树
虚树可以看做是对树形动态规划的一种求解优化 对于需要求答案的点p,只保留对答案有影响的节点,从而减少时间 BZOJ2286 dp[i]=min(val[i],Σdp[j](j为i的儿子)),val[i ...
- hadoop之安全篇
---------------持续更新中------------------- hadoop集群安全架构 如下图所示: --------------------------未完待续---------- ...
- 【AtCoder】ARC092 D - Two Sequences
[题目]AtCoder Regular Contest 092 D - Two Sequences [题意]给定n个数的数组A和数组B,求所有A[i]+B[j]的异或和(1<=i,j<=n ...
- text-align: justify;不能均匀分布问题
本文地址:http://www.cnblogs.com/veinyin/p/7617610.html 对于text-align来说,一般我们都是使用居中这个属性值,突然今天需要达到这样一个效果: 对 ...
- java学习笔记记录
Java内存模型: Java虚拟机规范中将Java运行时数据分为六种. 1.程序计数器:是一个数据结构,用于保存当前正常执行的程序的内存地址.Java虚拟机的多线程就是通过线程轮流切换并分配处理器时间 ...
- 【转】E: Sub-process /usr/bin/dpkg returned an error code (1)
原链接: jaryWang:E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决 1.$ sudo mv /var/lib/dpkg/ ...
- NYOJ 1063 生活的烦恼 (二叉树)
题目链接 描述 生活的暑假刚集训开始,他要决心学好字典树,二叉树,线段树和各种树,但生活在OJ上刷题的时候就遇到了一个特别烦恼的问题.那当然就是他最喜欢的二二叉树咯!题目是这样的:给你一颗非空的二叉树 ...
- zedboard学习记录.2.PS+PL 流水灯与uart
1.建立一个工程. 硬件设计 2.IP integrator -> create block desgin;Run Block Automation. 3.add IP -> AXI GP ...