06、ElasticStack系列,第六章:elasticsearch设置密码

news/2025/2/22 18:57:50

第六章:Elasticsearch设置密码

一、修改配置文件

##进入容器
docker exec -it elasticsearch bash

##启用认证
vi config/elasticsearch.yml
添加如下内容:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

##重启容器
docker restart elasticsearch

二、设置用户密码

##重启容器后,再次进入容器
docker exec -it elasticsearch /bin/bash
##执行一下命令
./bin/elasticsearch-setup-passwords interactive

##会 出现如下内容:
出现:Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]

##输入y  挨个输入密码即可

Please confirm that you would like to continue [y/N]y


Enter password for [elastic]: 
Reenter password for [elastic]: 
Enter password for [apm_system]: 
Reenter password for [apm_system]: 
Enter password for [kibana]: 
Reenter password for [kibana]: 
Enter password for [logstash_system]: 
Reenter password for [logstash_system]: 
Enter password for [beats_system]:

Reenter password for [beats_system]: 
Enter password for [remote_monitoring_user]: 
Reenter password for [remote_monitoring_user]: 
Changed password for user [apm_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]


##重启容器
docker restart elasticsearch

三、验证

http://192.168.73.107:9200/

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


http://www.niftyadmin.cn/n/5862655.html

相关文章

基于Python+Django+Vue的旅游景区推荐系统系统设计与实现源代码+数据库+使用说明

运行截图 功能介绍 前台功能包括:首页、详情页、订单、用户中心。后台功能包括:首页、轮播图管理、管理员、卖家管理、买家管理、景区管理、订单管理非开源功能(分类管理,地区管理,收藏管理,评论管理&a…

echarts找不到了?echarts社区最新地址

前言:在之前使用echarts的时候,还可以通过上边的导航栏找到echarts社区,但是如今的echarts变更之后,就找不到echarts社区了。 ✨✨✨这里是秋刀鱼不做梦的BLOG ✨✨✨想要了解更多内容可以访问我的主页秋刀鱼不做梦-CSDN博客 如今…

【雅思博客06】Daily Life

对话 A: Honey, the house is such a mess! I need you to help me tidy up a bit. My boss and her husband are coming over for dinner, and the house needs to be spotless! B: I’m in the middle of something right now. I’ll be there in a second. A: This can’t …

【电机控制器】ESP32-C3语言模型——豆包

【电机控制器】ESP32-C3语言模型——豆包 文章目录 [TOC](文章目录) 前言一、简介二、代码三、实验结果四、参考资料总结 前言 使用工具&#xff1a; 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、简介 二、代码 #include <WiFi.h> #inc…

【CXX】5 桥接模块参考

1 CXX主要概念概览已经涵盖了CXX用来表示语言边界的高级模型。本章在此基础上详细介绍#[cxx::bridge]的语法和功能。 extern “Rust” ——将不透明的Rust类型、Rust函数、Rust方法暴露给C&#xff1b;具有生命周期的函数。extern“C”——绑定不透明的C类型、C函数、C成员函数…

Android TabLayout 实现随意控制item之间的间距

效果 红色标注是不同的间距。 实现方式 1、xml中定义 <com.google.android.material.tabs.TabLayoutandroid:id"id/tab_layout"android:layout_width"wrap_content"app:tabIndicatorColor"color/color_FF00B2E3"app:tabBackground"a…

Spring Boot项目@Cacheable注解的使用

Cacheable 是 Spring 框架中用于缓存的注解之一&#xff0c;它可以帮助你轻松地将方法的结果缓存起来&#xff0c;从而提高应用的性能。下面详细介绍如何使用 Cacheable 注解以及相关的配置和注意事项。 1. 基本用法 1.1 添加依赖 首先&#xff0c;确保你的项目中包含了 Spr…

1. Linux下 MySQL 的详细安装与使用

1. Linux下 MySQL 的详细安装与使用 文章目录 1. Linux下 MySQL 的详细安装与使用1. Linux 下安装 MySQL8.0 的详细安装步骤&#xff1a;2. Linxu 当中的MySQL 设置远程登录3. 最后&#xff1a; 1. Linux 下安装 MySQL8.0 的详细安装步骤&#xff1a; 查看是否安装过MySQL&…