elasticsearch-8.1.0安装记录

目录

  • 零、版本说明
  • 一、安装
  • 二、使用客户端访问

零、版本说明

  • centos
[root@node1 ~]# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)
  • elasticsearch
elasticsearch-8.1.0-linux-x86_64

一、安装

systemctl stop firewalld.servicesystemctl disable firewalld.serviceyum install -y unzipcat >> /etc/security/limits.conf << EOF
es       hard    nofile  65536
es       soft    nofile  65536
EOFservice sshd restartecho "vm.max_map_count=655360" >> /etc/sysctl.confsysctl -p /etc/sysctl.confmkdir -p /export/appscd /export/appscurl -OL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.0-linux-x86_64.tar.gztar zxf elasticsearch-8.1.0-linux-x86_64.tar.gzchown -R es:es /export/apps/elasticsearch-8.1.0ln -s elasticsearch-8.1.0 eschown -R es:es /export/apps/esuseradd espasswd essu escd esmkdir -p /export/apps/es/datamkdir -p /export/apps/es/config/certs./bin/elasticsearch-certutil ca./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12mv *.p12 config/certs/./bin/elasticsearch-certutil http
  • elasticsearch-certutil http命令输入后,按以下输入操作

回车Nycerts/elastic-stack-ca.p12回车5yNnode1
node2
node3Y192.168.1.60
192.168.1.61
192.168.1.62YN回车回车
  • 完成后,继续执行
mv elasticsearch/http.p12  kibana/elasticsearch-ca.pem config/certs/cat > config/elasticsearch.yml << EOF
cluster.name: es-cluster
node.name: node1
path.data: /export/apps/es/data
path.logs: /export/apps/es/logs
network.host: node1
http.port: 9200
discovery.seed_hosts: ["node1"]
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:enabled: truekeystore.path: /export/apps/es/config/certs/http.p12truststore.path: /export/apps/es/config/certs/http.p12
xpack.security.transport.ssl:enabled: trueverification_mode: certificatekeystore.path: /export/apps/es/config/certs/elastic-certificates.p12truststore.path: /export/apps/es/config/certs/elastic-certificates.p12
cluster.initial_master_nodes: ["node1"]
http.host: [_local_,_site_]
ingest.geoip.downloader.enabled: false
xpack.security.http.ssl.client_authentication: none
EOF./bin/elasticsearch━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.ℹ️  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):2nr4oJu0RCJWljIT053Q❌ Unable to generate an enrollment token for Kibana instances, try invoking `bin/elasticsearch-create-enrollment-token -s kibana`.❌ An enrollment token to enroll new nodes wasn't generated. To add nodes and enroll them into this cluster:
• On this node:⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.⁃ Restart Elasticsearch.
• On other nodes:⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  • 出现以上界面后,将该信息保存
  • 访问https://node1:9200,使用上面的安装信息中提示的用户名(elastic)和密码(2nr4oJu0RCJWljIT053Q)登录
  • 出现以下响应,代表安装成功
{"name" : "node1","cluster_name" : "es-cluster","cluster_uuid" : "nkAVncJFS8u0CXaEXwcTrQ","version" : {"number" : "8.1.0","build_flavor" : "default","build_type" : "tar","build_hash" : "3700f7679f7d95e36da0b43762189bab189bc53a","build_date" : "2022-03-03T14:20:00.690422633Z","build_snapshot" : false,"lucene_version" : "9.0.0","minimum_wire_compatibility_version" : "7.17.0","minimum_index_compatibility_version" : "7.0.0"},"tagline" : "You Know, for Search"
}
  • 节点配置方法一样,需要修改config/elasticsearch.ymlnode.namenetwork.host为对应节点配置

  • CTRL+C停止node1的es服务,使用-d参数启动后台服务,集群子节点在修改配置后,使用相同命令加入集群

./bin/elasticsearch -d

二、使用客户端访问

  • 示例使用insomnia,POSTMAN和curl等同:添加OATH -> BASE_AUTH

在这里插入图片描述
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/651988.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Magnet for Mac:高效窗口管理工具

Magnet for Mac是一款专为Mac用户设计的窗口管理工具&#xff0c;旨在帮助用户更高效地管理和布局多个应用程序窗口&#xff0c;提升工作效率。 Magnet for Mac v2.14.0中文免激活版下载 这款软件拥有直观易用的界面和丰富的功能&#xff0c;支持用户将屏幕分割成多个区域&…

ssm智能停车场管理系统

视频演示效果: SSMvue智能停车场 摘 要 本论文主要论述了如何使用JAVA语言开发一个智能停车场管理系统&#xff0c;本系统将严格按照软件开发流程进行各个阶段的工作&#xff0c;采用B/S架构&#xff0c;面向对象编程思想进行项目开发。在引言中&#xff0c;作者将论述智能停车…

WEB攻防-PHP特性-函数缺陷对比

目录 和 MD5函数 intval ​strpos in_array preg_match str_replace 和 使用 时&#xff0c;如果两个比较的操作数类型不同&#xff0c;PHP 会尝试将它们转换为相同的类型&#xff0c;然后再进行比较。 使用 进行比较时&#xff0c;不仅比较值&#xff0c;还比较变量…

Vuforia AR篇(四)— AR虚拟按钮

目录 前言一、创建虚拟按钮二、创建脚本三、效果 前言 在当今互联网和移动设备普及的背景下&#xff0c;**增强现实&#xff08;AR&#xff09;**技术正迅速成为连接现实世界与数字信息的重要桥梁。AR虚拟按钮作为这一技术的创新应用&#xff0c;不仅提供了一种全新的用户交互…

uniapp 微信小程序 分享海报的实现

主页面 <template><view class"page"><!-- 自定义导航栏--><Navbar title"我的海报"></Navbar><view class"container"><poster ref"poster" :imageUrl"image" :imageWidth"7…

基于STC12C5A60S2系列1T 8051单片机正常模式或移位模式控制数码管某位闪烁后单击长按增加或减少数值应用

基于STC12C5A60S2系列1T 8051单片机正常模式或移位模式控制数码管某位闪烁后单击长按增加或减少数值应用 STC12C5A60S2系列1T 8051单片机管脚图STC12C5A60S2系列1T 8051单片机I/O口各种不同工作模式及配置STC12C5A60S2系列1T 8051单片机I/O口各种不同工作模式介绍基于STC12C5A6…

数据结构与算法解题-20240426

这里写目录标题 面试题 08.04. 幂集367. 有效的完全平方数192. 统计词频747. 至少是其他数字两倍的最大数718. 最长重复子数组 面试题 08.04. 幂集 中等 幂集。编写一种方法&#xff0c;返回某集合的所有子集。集合中不包含重复的元素。 说明&#xff1a;解集不能包含重复的子…

React真的好难用

我发现React就像个宗教一样&#xff0c;网络上总有一群信徒。信徒&#xff1a;React天下第一&#xff0c;谁也不能说他不好。 网络上大佬对React的评价一般有几类&#xff1a; React跟Vue比就是手动档和自动档的区别&#xff0c;高手都开手动档。—— 就一个破打工的&#xf…

06.Cesium快速上手-Primitive图元的讲解

Primitive 结构图解&#xff1a; 图元表示 Scene 中的几何图形。几何图形可以来自单个 GeometryInstance 例子1&#xff1a; // Create the viewer. const viewer new Cesium.Viewer("cesiumContainer"); const scene viewer.scene;// Draw a red box and po…

SpringCloud系列(18)--将服务提供者Provider注册进Consul

前言&#xff1a;在上一章节中我们把服务消费者Consumer注册进了Zookeeper&#xff0c;并且成功通过服务消费者Consumer调用了服务提供者Provider&#xff0c;而本章节则是关于如何将服务提供者Provider注册进Consul里 准备环境&#xff1a; 先安装Consul&#xff0c;如果没有…

【系统架构师】-选择题(四)

1、“41”视图 ①逻辑视图(Logical View)&#xff0c;设计的对象模型(使用面向对象的设计方法时)。 ②过程视图(Process View)&#xff0c;捕捉设计的并发和同步特征。系统集成师 ③物理视图(Physical View)&#xff0c;描述了软件到硬件的映射&#xff0c;反映了分布式特性。系…

星尘智能 AI 机器人 S1——国产机器人的巅峰之作

AI智能机器人真的太炸裂了 国产科技威武-CSDN直播AI智能机器人真的太炸裂了 国产科技威武https://live.csdn.net/v/382519 最近发现了一个国产的机器人&#xff0c;真的让人惊叹不已&#xff01;它就是星尘智能 AI 机器人 S1&#xff01; 这个机器人简直太牛逼了&#xff01;…