Elasticsearch7.2集群的详细安装过程
发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,本篇内容介绍了"Elasticsearch7.2集群的详细安装过程"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能
千家信息网最后更新 2025年02月03日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安全错误
数据库的锁怎样保障安全
软件开发文档范例
数据库表格如何选择空值
怀旧服服务器经验怎么刷
东京软件开发
html搜索查询数据库
网络安全策略的类型
关闭服务器对企业有影响吗
南京杭州上海软件开发工作
信息网络安全刊号
毕业设计校园网络安全
网络安全电子屏标语图片
邢台软件开发企业
联想x86服务器维保
局域网如何搭建云服务器
核心交换机与存储服务器怎么连接
软件开发团队旅游口号
数据库的安全性是谁的职责
TCGA数据库融合
嵌入式数据库优点
数据库管理资源共享
软件开发活动的基本原理
蓝思科技工业互联网产业
vpn服务器搭建
sql数据库real表
广联达软件数据库异常
新浪新闻军武数据库
网络安全实习收获体验
xml存储数据库查询数据
网络安全监管app
南通通微软件开发公司