ElasticSearch安装部署,基本配置(Ubuntu14.04)
ElasticSearch部署文档(Ubuntu 14.04)
安装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
java -version
whereis java
which java (java执行路径)
echo $JAVA_HOME
echo $PATH
安装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 95 10
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 65535
EOF
# 在/etc/default/elasticsearch中修改:
MAX_OPEN_FILES=65535
cat <<EOF>> /etc/sysctl.conf
vm.max_map_count=262144
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 / 2) + 1。 下面的值是在3个有主节点资格的情况下设定
# 因为节点数,以后可以增加,或者减少,故该配置可以动态修改
discovery.zen.minimum_master_nodes: 2
# 恢复控制
gateway.recover_after_nodes: 2
gateway.expected_nodes: 3
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:9200/_nodes/process?pretty
参考链接
- 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
ElasticSearch安装部署,基本配置(Ubuntu14.04)的更多相关文章
- Openmpi 编译安装+集群配置 + Ubuntu14.04 + SSH无密码连接 + NFS共享文件系统
来源 http://www.open-mpi.org/ 网络连接 SSH连接,保证各台机器之间可以无密码登陆,此处不展开 hosts文件如下 #/etc/hosts 192.168.0.190 mas ...
- UEFI双硬盘安装win8.1和Ubuntu14.04
UEFI双硬盘安装win8.1和Ubuntu14.04 安装环境 UEFI启动模式 双GPT硬盘 一个ssd 一个hdd 笔记本已安装win8.1 硬盘启动顺序为: U盘 ssd hdd 光驱 安装方 ...
- ELK日志监控平台安装部署简介--Elasticsearch安装部署
最近由于工作需要,需要搭建一个ELK日志监控平台,本次采用Filebeat(采集数据)+Elasticsearch(建立索引)+Kibana(展示)架构,实现日志搜索展示功能. 一.安装环境描述: 1 ...
- DL服务器主机环境配置(ubuntu14.04+GTX1080+cuda8.0)解决桌面重复登录
DL服务器主机环境配置(ubuntu14.04+GTX1080+cuda8.0)解决桌面重复登录 前面部分是自己的记录,后面方案部分是成功安装驱动+桌面的正解 问题的开始在于:登录不了桌面,停留在重复 ...
- Elasticsearch安装与环境配置
Elasticsearch安装与环境配置 确保机器上已经安装了jdk7以上版本 下载:官网下载地址:https://www.elastic.co/downloads/elasticsearch 将下载 ...
- Hive安装部署与配置
Hive安装部署与配置 1.1 Hive安装地址 1)Hive官网地址: http://hive.apache.org/ 2)文档查看地址: https://cwiki.apache.org/conf ...
- Kubernetes及Dashboard详细安装配置(Ubuntu14.04)
前些日子部门计划搞并行开发,需要对开发及测试环境进行隔离,所以打算用kubernetes对docker容器进行版本管理,搭建了下Kubernetes集群,过程如下: 本流程使用了阿里云加速器,配置流程 ...
- 开源防火墙(pfSense)的安装部署与配置
pfSense是一个基于FreeBSD架构的软件防火墙,通常会被安装在多网卡的主板上作为路由器或者防火墙去使用.往往这些硬件都比较廉价,高性能的配置也就1千元左右.pfSense具有商业防火墙的大部分 ...
- Zookeeper单机安装部署与配置(二)
在上篇博客中简单介绍了Zookeeper的特点和应用场景,详情可参考:<Zookeeper简介(一)>,那么这篇博客我们介绍一下关于Zookeeper的单机模式安装步骤与配置. 环境准备 ...
- Disconf 学习系列之全网最详细的最新稳定Disconf 搭建部署(基于Ubuntu14.04 / 16.04)(图文详解)
不多说直接上干货! https://www.cnblogs.com/wuxiaofeng/p/6882596.html (ubuntu16.04) https://www.cnblogs.com/he ...
随机推荐
- day041 前端HTML CSS基本选择器(未整理完毕)
标签: <b> :加粗 <i> :倾斜体 <u>: 下划线 <s>: 删除线 <p>:段落 <h1> - <h6> ...
- MarkDown编辑器中缩进
首先,Markdown是不支持缩进的. 在Markdown里按下四个空格,就自动转入Code模式. 在Markdown里一个回车,不是分段而是换行,要两个回车,才是分段. 分段和换行的区别是:换行后, ...
- 十五. Python基础(15)--内置函数-1
十五. Python基础(15)--内置函数-1 1 ● eval(), exec(), compile() 执行字符串数据类型的python代码 检测#import os 'import' in c ...
- Linux3.10.0块IO子系统流程(1)-- 上层提交请求
Linux通用块层提供给上层的接口函数是submit_bio.上层在构造好bio之后,调用submit_bio提交给通用块层处理. submit_bio函数如下: void submit_bi ...
- CString、string、const char*的相互转换
环境:vs2010 1.CString转string //第一种方式: CString str = _T("CSDN"); USES_CONVERSION; std::string ...
- FPGA的GTP(aurora 协议)高速串行接口数据收发(转)
reference:https://blog.csdn.net/qq_40261818/article/details/83039829 PG046-Aurora 8B/10B Logicore I ...
- 201621123001 《Java程序设计》第11周学习总结
1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 一个进程可以同时运行多个不同线程,不同的线程执行不同的任务 Java线程是通过java.lang包中定义的Thre ...
- Problem C: 默认参数:求圆面积
Description 编写一个带默认值的函数,用于求圆面积.其原型为: double area(double r=1.0); 当调用函数时指定参数r,则求半径为r的圆的面积:否则求半径为1的圆面积. ...
- 实力封装:Unity打包AssetBundle(四)
→→前情提要:窗口初现←← 让用户选择要打包的文件 时至今日,我们选择打包文件的方式依然是在Project面板或Hierarchy面板中用鼠标点选.现在既然有了窗口,我们自然希望可以将所有文件罗列在窗 ...
- UIIimageView读取图片的两种方式及动画的执行
/**count:图片数量 name:图片名称*/ - (void)runAnimationWithCount:(int)count name:(NSString *)name { if(self.t ...