Elasticsearch7.2集群的详细安装过程
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,本篇内容介绍了"Elasticsearch7.2集群的详细安装过程"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能
千家信息网最后更新 2025年12月02日Elasticsearch7.2集群的详细安装过程
本篇内容介绍了"Elasticsearch7.2集群的详细安装过程"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
1、配置文件
[root@es1 ~]# grep '^[a-zA-Z]' /etc/elasticsearch/elasticsearch.ymlcluster.name: xing-applicationnode.name: node-1path.data: /var/lib/elasticsearchpath.logs: /var/log/elasticsearchnetwork.host: 0.0.0.0cluster.initial_master_nodes: ["node-1"]http.cors.enabled: truehttp.cors.allow-origin: "*"discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"][root@es1 ~]#[root@es2 ~]# grep '^[a-zA-Z]' /etc/elasticsearch/elasticsearch.ymlcluster.name: xing-applicationnode.name: node-2path.data: /var/lib/elasticsearchpath.logs: /var/log/elasticsearchnetwork.host: 0.0.0.0cluster.initial_master_nodes: ["node-1"]http.cors.enabled: truehttp.cors.allow-origin: "*"discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"][root@es2 ~]# [root@es3 ~]# grep '^[a-zA-Z]' /etc/elasticsearch/elasticsearch.ymlcluster.name: xing-applicationnode.name: node-3path.data: /var/lib/elasticsearchpath.logs: /var/log/elasticsearchnetwork.host: 0.0.0.0cluster.initial_master_nodes: ["node-1"]http.cors.enabled: truehttp.cors.allow-origin: "*"discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"][root@es3 ~]#
2、安装命令
yum -y localinstall kibana-7.2.0-x86_64.rpm elasticsearch-7.2.0-x86_64.rpm
参考下载地址
https://www.elastic.co/cn/downloads/past-releases
3、启动命令
/etc/init.d/elasticsearch start
4、参数说明
cluster.name: xing-application配置es的集群名称,默认是elasticsearch,es会自动发现在同一网段下的es,如果在同一网段下有多个集群,就可以用这个属性来区分不同的集群。node.name: node-1节点名,默认随机指定一个name列表中名字,该列表在es的jar包中config文件夹里name.txt文件中,其中有很多作者添加的有趣名字。path.data: /var/lib/elasticsearch设置索引数据的存储路径,默认是es根目录下的data文件夹,可以设置多个存储路径,用逗号隔开。path.logs: /var/log/elasticsearch设置日志文件的存储路径,默认是es根目录下的logs文件夹network.host: 0.0.0.0设置绑定的ip地址,可以是ipv4或ipv6的cluster.initial_master_nodes: ["node-1"]参数设置一系列符合主节点条件的节点的主机名或 IP 地址来引导启动集群。手动指定可以成为 mater 的所有节点的 name 或者 ip,这些配置将会在第一次选举中进行计算http.cors.enabled: true如果启用了 HTTP 端口,那么此属性会指定是否允许跨域 REST 请求。http.cors.allow-origin: "*"如果 http.cors.enabled 的值为 true,那么该属性会指定允许 REST 请求来自何处。discovery.seed_hosts: ["192.168.56.14", "192.168.56.15", "192.168.56.16"]配置集群的主机地址,配置之后集群的主机之间可以自动发现
防止脑裂:
discovery.zen.minimum_master_nodes=集群节点/2+1
5、集群最终效果
6、tar.gz 安装错误处理
6.1、启动报错
启动用户需要非root,如果用root用户启动了,需要删除logs和config目录下root生成文件
6.2、环境配置报错
错误:
ERROR: [3] bootstrap checks failed[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535][2]: max number of threads [3869] for user [elasticsearch] is too low, increase to at least [4096][3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
对应处理:
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535][root@es1 ~]# cat /etc/sysctl.conf * soft nofile 65536* hard nofile 65536[2]: max number of threads [3869] for user [elasticsearch] is too low, increase to at least [4096][root@es1 ~]# cat /etc/security/limits.d/20-nproc.conf * soft nproc 40960* hard nproc 40960[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144][root@es1 ~]# cat /etc/sysctl.conf vm.max_map_count=655360[root@es1 ~]# sysctl -pvm.max_map_count = 655360[root@es1 ~]#
"Elasticsearch7.2集群的详细安装过程"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!
集群
文件
配置
地址
节点
过程
主机
属性
文件夹
路径
存储
内容
参数
名字
命令
多个
更多
根目录
用户
知识
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
ff14转服务器
青岛加加互联网络科技有限公司
不适合做软件开发怎么办
部落冲突登陆服务器错误怎么办
乌海市云计算网络安全
怎么重启网站服务器
软件开发公司销售员
网络安全防骗辩论赛
软件开发幽默别称
视频存储服务器怎么发布链接
数据库显示未在本机计算机上注册
绝地求生轻量版服务器维护中
网络技术服务合同乙方义务
黑月服务器怎么挤进去
英雄联盟用什么编程软件开发
服务器电源风扇突然很响
连接数据库服务器的语句
黑暗与光明选择服务器怎么打不开
福建共赢软件开发公司
网络安全个人专项整治
玖二柒互联网科技公司营销模式
网络安全认识不深
仙桃市游戏软件开发
工业互联网算不算科技
网络安全靠大家手抄报8K
网络安全主题征文600字
花旗软件开发面试
数据库表查询怎么一次查多个字段
正规的电脑服务器回收
如何使用学校自建数据库