Linux ES集群服务配置说明
说明:
ES官网不建议在root用户使用Elastic Server,因此ES集群配置均使用普通账户操作,新建账户 elastic。
Linux版本为CentOS 7.3,ES版本为5.5.0.
一、下载并安装ES程序
下载路径:/home/elastic
下载指令:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.tar.gz
安装指令:tar -zxvf elasticsearch-5.5.0.tar.gz
二、系统参数设置
为了让ES服务正常启动,需要设置如下参数(root用户权限):
1、修改max file descriptors参数
vim /etc/security/limits.conf打开limits文件
添加或修改如下两行参数:
* hard nofile 65536
* soft nofile 65536
查看设置参数是否生效指令:
ulimit -Hn
注:账户需要注销后重新登录方可查看设置值。
此设置参数对应ES启动错误如下:
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
2、修改vm.max_map_count参数
1)临时修改方法:
sysctl -w vm.max_map_count=262144
sysctl -p
查看参数指令:
sysctl -a | grep "vm.max_map_count"
注:主机重启后,参数会还原。
2)永久修改方法:
vim /etc/sysctl.conf添加vm.max_map_count=262144,保存后执行sysctl -p即可。
此设置参数对应ES启动错误如下:
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
三、ES集群配置
客户端节点Clinet:
内网ip:172.26.178.100
elasticsearch.yml参数配置:路径/home/elastic/elasticsearch-5.5.0/config
修改文件参数如下:
cluster.name: tuyou-application
node.name: node-195
#client节点设置
node.master: false
node.data: false
network.host: 172.26.178.100
http.port: 9200
#查询master节点地址列表
discovery.zen.ping.unicast.hosts: ["172.26.178.99", "172.26.178.98"]
#配合head插件管理ES集群
http.cors.enabled: true
http.cors.allow-origin: "*"
混合节点Master/Data:
内网ip:172.26.178.99
elasticsearch.yml参数配置:
修改文件参数如下:
cluster.name: tuyou-application
node.name: node-255
network.host: 172.26.178.99
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.26.178.98", "172.26.178.99"]
discovery.zen.minimum_master_nodes: 2
混合节点Master/Data:
内网ip:172.26.178.98
elasticsearch.yml参数配置:
修改文件参数如下:
cluster.name: tuyou-application
node.name: node-150
network.host: 172.26.178.98
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.26.178.99", "172.26.178.98"]
discovery.zen.minimum_master_nodes: 2
四、安装分词插件
注:Client节点无需安装
插件包括:ik中文分词插件,pinyin拼音分词插件,注意插件版本应和ES版本一致。
分别将插件文件夹拷贝到ES的plugins路径,路径地址如下:
/home/elastic/elasticsearch-5.5.0/plugins
Ik插件配置说明:
路径:/home/elastic/elasticsearch-5.5.0/plugins/ik/config下的IKAnalyzer.cfg.xml文件。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>IK Analyzer 扩展配置</comment>
<!--用户可以在这里配置自己的扩展字典 -->
<entry key="ext_dict">custom/mydict.dic;custom/single_word_low_freq.dic;custom/sougou.dic</entry>
<!--用户可以在这里配置自己的扩展停止词字典-->
<entry key="ext_stopwords">custom/ext_stopword.dic</entry>
<!--用户可以在这里配置远程扩展字典 -->
<!-- <entry key="remote_ext_dict">http://192.168.1.152:8080/tour/interface/getCustomDict.htm</entry> -->
<!--用户可以在这里配置远程扩展停止词字典-->
<!-- <entry key="remote_ext_stopwords">words_location</entry> -->
</properties>
注:外部词典暂时关闭。
五、启动服务
三台服务均切换到elastic用户,所处路径为:
/home/elastic
执行如下指令,后台启动ES服务:
./elasticsearch-5.5.0/bin/elasticsearch -d
查看ES服务进程指令:
ps -ef | grep elasticsearch
启动后,可通过如下命令查看服务是否正常运行:
curl http://内网ip:9200/
Linux ES集群服务配置说明的更多相关文章
- Linux集群服务 LVS
linux虚拟服务器(LVS)项目在linux操作系统上提供了最常见的负载均衡软件. 集群定义: 集群(cluster)技术是一种较新的技术,通过集群技术,可以在付出较低成本的情况下获得在性能.可靠性 ...
- 大数据项目之_15_帮助文档_NTP 配置时间服务器+Linux 集群服务群起脚本+CentOS6.8 升级到 python 到 2.7
一.NTP 配置时间服务器1.1.检查当前系统时区1.2.同步时间1.3.检查软件包1.4.修改 ntp 配置文件1.5.重启 ntp 服务1.6.设置定时同步任务二.Linux 集群服务群起脚本2. ...
- Linux Centos7 环境搭建Docker部署Zookeeper分布式集群服务实战
Zookeeper完全分布式集群服务 准备好3台服务器: [x]A-> centos-helios:192.168.19.1 [x]B-> centos-hestia:192.168.19 ...
- docker 快速部署ES集群 spark集群
1) 拉下来 ES集群 spark集群 两套快速部署环境, 并只用docker跑起来,并保存到私库. 2)弄清楚怎么样打包 linux镜像(或者说制作). 3)试着改一下,让它们跑在集群里面. 4) ...
- ES集群
1. ElasticSerach集群安装 修改配置文件elasticserach.yml [elk@localhost config]$ vi elasticsearch.yml # ------- ...
- ES集群监控 之 Cerebro 0.8.3 安装及简单使用
注意权限,不建议使用root,同es集群的启动用户相同即可 1. 下载 & 解压 # 下载 wget https://github.com/lmenezes/cerebro/releases/ ...
- 搭建ES集群
服务版本选择 TEG的ctsdb当前最高版本采用的是es的6.4.3版本,为了日后与ctsdb衔接方便,部署开源版es时也采用该版本.6.4.3版本的es依赖的jdk版本要求在8u181以上,测试环境 ...
- Linux企业集群用商用硬件和免费软件构建高可用集群PDF
Linux企业集群:用商用硬件和免费软件构建高可用集群 目录: 译者序致谢前言绪论第一部分 集群资源 第1章 启动服务 第2章 处理数据包 第3章 编译内容 第二部分 高可用性 第4章 使用rsync ...
- LVS负载均衡集群服务搭建详解(一)
LVS概述 1.LVS:Linux Virtual Server 四层交换(路由):根据请求报文的目标IP和目标PORT将其转发至后端主机集群中的某台服务器(根据调度算法): 不能够实现应用层的负载均 ...
随机推荐
- Web移动前端开发-——rem+less+媒体查询,rem+flexble.js+媒体查询
实际开发搞搞起来!!!! rem适配方案 媒体查询+rem+less 基础知识铺垫 第一步,我们需要拿到设计稿,安装设计稿的要求来设置一个合适的html字体大小. 第二步,计算元素大小的取值 页面re ...
- REST接口
全名是Representational State Transfer REST是设计风格而不是标准 建议将JSON格式作为标准响应格式 -------------------------------- ...
- 让vscode使用Pipenv工作环境
1.查看Pipenv的位置 # 先激活Pipenv环境 pipenv shell # 获取当前虚拟环境的位置 pipenv --venv 2.打开setting.json配置文件 Ctrl+Shift ...
- 六十五、SAP中通过BREAK-POINT下断点,进行调试
一.代码如下,有2个断点的按钮,可以可以写入BREAK-POINT人工断点 二.运行之后,程序会被断下来, 四个执行按钮,意思分别为:单步进入子程序,单步不进入子程序,返回外面,执行到断点处 三.我们 ...
- Elasticsearch Query DSL(查询语言)
章节 Elasticsearch 基本概念 Elasticsearch 安装 Elasticsearch 使用集群 Elasticsearch 健康检查 Elasticsearch 列出索引 Elas ...
- Hibernate 的SessionFactory
1.当我们调用 Configuration config=new Configuration().configure(); 时候Hibernate会自动在当前的CLASSPATH中搜寻hibernat ...
- Python爬虫实战(一) 使用urllib库爬取拉勾网数据
本笔记写于2020年2月4日.Python版本为3.7.4,编辑器是VS code 主要参考资料有: B站视频av44518113 Python官方文档 PS:如果笔记中有任何错误,欢迎在评论中指出, ...
- PowerDesigner 破解版,汉化包!
链接:https://pan.baidu.com/s/1R_6g6keo2Y4_V0c1ImeFbA 密码:ncju
- leetcode406 ,131,1091 python
LeetCode 406. Queue Reconstruction by Height 解题报告题目描述Suppose you have a random list of people standi ...
- PAT Advanced 1030 Travel Plan (30) [Dijkstra算法 + DFS,最短路径,边权]
题目 A traveler's map gives the distances between cities along the highways, together with the cost of ...