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 来源:腾云阁 ...
随机推荐
- Meeting HDU - 5521 虚点建图
Problem Description Bessie and her friend Elsie decide to have a meeting. However, after Farmer John ...
- linux shell学习一
本博客参考自: http://www.cnblogs.com/waitig/p/5523409.html <shell从入门到精通> 张春晓编著 Shell简介 Shell自身是一个用C ...
- C语言基本类型的字节数
- Idea工具常用技巧总结
转自:https://www.jianshu.com/p/131c2deb3ecf Idea常用技巧总结 1.无处不在的跳转 注:这里的快捷键是自己定义的,并非大家的都一样,可以通过findActio ...
- UVA 1390 Interconnect
https://vjudge.net/problem/UVA-1390 题意: 给出n个点m条边的无向图, 每次随机加一条非自环的边,(加完后可出现重边), 添加每条边的概率是相等的 求使图连通的期望 ...
- 数学&搜索:博弈论之极大极小搜索与alpha-beta减枝
目的是寻找最优的方案使得自己能够利益最大化. 基本思想就是假设自己(A)足够聪明,总是能选择最有利于自己的方案,而对手(B)同样足够聪明,总会选择最不利A的方案 对抗搜索就是对于先手来说,取后手中状态 ...
- Lua的各种资源2
Lua Directory This page is a top level directory of all Lua content at this wiki, grouped by top ...
- 选择问题(选择数组中第K小的数)
由排序问题可以引申出选择问题,选择问题就是选择并返回数组中第k小的数,如果把数组全部排好序,在返回第k小的数,也能正确返回,但是这无疑做了很多无用功,由上篇博客中提到的快速排序,稍稍修改下就可以以较小 ...
- django框架<二>
django框架: Models 1.基本创建 Django提供了一个抽象层("Model")的构建和管理Web应用程序的数据. Django使用一种新的方式,即:关系对象映射 ...
- onvif客户端
前言 做开发有8年时间了,ffmpeg和onvif与我是特别有缘的了(说着玩的,我更认为是因为他们确实强大^_^). ffmpeg在毕业设计时就有用到,5年后做windows.linux播放库时又有用 ...