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 来源:腾云阁 ...
随机推荐
- mybatis中的resultMap与resultType、parameterMap与 parameterType的区别
Map:映射:Type:Java类型 resultMap 与 resultType.parameterMap 与 parameterType的区别在面试的时候被问到的几率非常高,项目中出现了一个小b ...
- Swagger2 添加HTTP head参数,解决用户是token信息保留
转:http://blog.csdn.net/u014044812/article/details/71473226 大家使用swagger往往会和JWT一起使用,而一般使用jwt会将token放在h ...
- 题解 P2472 【[SCOI2007]蜥蜴】
P2472 [SCOI2007]蜥蜴 题目背景 07四川省选 题目描述 在一个r行c列的网格地图中有一些高度不同的石柱,一些石柱上站着一些蜥蜴,你的任务是让尽量多的蜥蜴逃到边界外. 每行每列中相邻石柱 ...
- SpringBoot ( 八 ) :RabbitMQ 详解
原文出处: 纯洁的微笑 RabbitMQ 即一个消息队列,主要是用来实现应用程序的异步和解耦,同时也能起到消息缓冲,消息分发的作用. 消息中间件在互联网公司的使用中越来越多,刚才还看到新闻阿里将Roc ...
- 配置JNDI数据源
配置JNDI数据源: 在MATE-INF中新建一个context.xml <?xml version="1.0" encoding="UTF-8"?> ...
- C++ string类析构报错
我项目中用到了字符串的Base64转码.DES解密等功能,可能DES解密算法只能解密8字节倍数长度的字符串,所以我得到的结果总会存在一个多余的“尾巴”,于是我想要做一个字符串尾部清理的工作.我的做法是 ...
- CF839 D 容斥
求$gcd>1$的所有$gcd(a_i,a_{i+1}…a_{n})*(n-i+1)$的和 首先先标记所有出现的数.从高到低枚举一个数k,记录它的倍数出现次数cnt,那么当前所有组合的答案就是$ ...
- NOJ1659 求值 log10取对+floor
问题描述 给你三个数a,b,c,求a的b次的前c位数(不够c位输出全部即可) 输入 输入数据有多组,每组占一行,有三个整数,之间有空格.(0<a,b<2147483648,0<c ...
- kali2.0安装虚拟机工具
kali2.0无法安装虚拟机工具,显示VMware Tools无法用于该虚拟机,或者安装之后无法进行复制.粘贴等操作. 解决办法: step1: 更换源 root@starnight:~# vim / ...
- 设计模式之Adapter
设计模式总共有23种模式这仅仅是为了一个目的:解耦+解耦+解耦...(高内聚低耦合满足开闭原则) 介绍: 将两个不兼容的类纠合在一起使用,属于结构型模式,也有人称它为wrapper(包装类). 包装类 ...