当前位置: 首页 > news >正文

docker-compose安装ES7.14和Kibana7.14(有账号密码)

一、docker-compose安装ES7.14.0和kibana7.14.0

1、下载镜像

1.1、ES镜像

docker pull elasticsearch:7.14.0

1.2、kibana镜像

docker pull kibana:7.14.0

2、docker-compose安装ES和kibana

2.1、创建配置文件目录和文件

#创建目录

mkdir -p /home/es-kibana/config

mkdir -p /home/es-kibana/data

mkdir -p /home/es-kibana/plugins

#给挂载目录授权

chmod 777 -R  /home/es-kibana/config

chmod 777  /home/es-kibana/es-data/data

chmod 777  /home/es-kibana/es-data/logs

chmod 777  /home/es-kibana/es-data/plugins

2.2、ES配置文件

1、elasticesearch.yml

cluster.name: "docker-cluster"
network.host: 0.0.0.0

discovery.zen.minimum_master_nodes: 1
discovery.type: single-node

xpack.security.enabled: true     #此项开启账号密码

2、jvm.options
## JVM configuration################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space-Xms1g
-Xmx1g
-XX:+IgnoreUnrecognizedVMOptions
################################################################
## Expert settings
################################################################
##
## All settings below this section are considered
## expert settings. Don't tamper with them unless
## you understand what you are doing
##
################################################################## GC configuration
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly## G1GC Configuration
# NOTE: G1GC is only supported on JDK version 10 or later.
# To use G1GC uncomment the lines below.
# 10-:-XX:-UseConcMarkSweepGC
# 10-:-XX:-UseCMSInitiatingOccupancyOnly
# 10-:-XX:+UseG1GC
# 10-:-XX:InitiatingHeapOccupancyPercent=75## optimizations# pre-touch memory pages used by the JVM during initialization
-XX:+AlwaysPreTouch## basic# explicitly set the stack size
-Xss1m# set to headless, just in case
-Djava.awt.headless=true# ensure UTF-8 encoding by default (e.g. filenames)
-Dfile.encoding=GBK# use our provided JNA always versus the system one
-Djna.nosys=true# turn off a JDK optimization that throws away stack traces for common
# exceptions because stack traces are important for debugging
-XX:-OmitStackTraceInFastThrow# flags to configure Netty
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0# log4j 2
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true-Djava.io.tmpdir=${ES_TMPDIR}## heap dumps# generate a heap dump when an allocation from the Java heap fails
# heap dumps are created in the working directory of the JVM
-XX:+HeapDumpOnOutOfMemoryError# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
-XX:HeapDumpPath=data# specify an alternative path for JVM fatal error logs
-XX:ErrorFile=logs/hs_err_pid%p.log## JDK 8 GC logging8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:logs/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
# time/date parsing will break in an incompatible way for some date patterns and locals
9-:-Djava.locale.providers=COMPAT# temporary workaround for C2 bug with JDK 10 on hardware with AVX-512
10-:-XX:UseAVX=2

主要是这3个配置项

2.3、kibana配置

i18n.locale: zh-CN

server.host: "0.0.0.0"

server.shutdownTimeout: "5s"

elasticsearch.hosts: [ "http://10.1.1.197:9200" ]

monitoring.ui.container.elasticsearch.enabled: true

elasticsearch.username: "elastic"
elasticsearch.password: "xxx"

2.4、#创建docker-compose.yml文件(重要)

version: '3'services:elasticsearch:image: elasticsearch:7.14.0container_name: es7-14restart: unless-stoppedvolumes:- ./es-data/data:/usr/share/elasticsearch/data- ./es-data/logs:/usr/share/elasticsearch/logs# 挂载分词器的目录#- ./es-data/plugins:/usr/share/elasticsearch/plugins- ./config/jvm.options:/usr/share/elasticsearch/config/jvm.options- ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.ymlports:- "9100:9100"- "9200:9200"networks:- eskibana:image: kibana:7.14.0container_name: kibana7-14ports:- "5601:5601"volumes:- ./config/kibana.yml:/usr/share/kibana/config/kibana.ymldepends_on:- elasticsearchnetworks:- esnetworks:es:driver: bridge

2.5、#自我检测自己写的有没有语法上的问题

docker-compose config -q

2.6、#启动和停止

docker-compose up -d

docker-compose down

重启

docker-compose restart 容器id

3、ES设置账号密码

3.1、检查elasticesearch.yml已配置

xpack.security.enabled: true     #此项开启账号密码(只配置这项就可以了)

3.2、设置用户名和密码的命令

参考:【精选】ElasticSearch7.14设置内置用户,使用用户名密码访问

这里需要为4个用户分别设置密码,elastic, kibana, logstash_system,beats_system。(interactive 手动设置, auto 自动生成密码 )

bin/elasticsearch-setup-passwords interactive

#进入es容器操作步骤

$docker exec -it es7-14 /bin/bash

#手动创建密码
$bin/elasticsearch-setup-passwords interactive

3、访问ES和kibana

3.1、访问ES

http://10.1.1.197:9200/

需要输入账号密码即可登录

3.2、访问kibana

http://10.1.1.197:5601/

备注:

设置密码的配置文件,配置这个就可以了

xpack.security.enabled: true     #此项开启账号密码(只配置这项就可以了)

然后进入容器里配置密码bin/elasticsearch-setup-passwords interactive就可用了。

相关文章:

docker-compose安装ES7.14和Kibana7.14(有账号密码)

一、docker-compose安装ES7.14.0和kibana7.14.0 1、下载镜像 1.1、ES镜像 docker pull elasticsearch:7.14.0 1.2、kibana镜像 docker pull kibana:7.14.0 2、docker-compose安装ES和kibana 2.1、创建配置文件目录和文件 #创建目录 mkdir -p /home/es-kibana/config mkdir…...

k8s-----14、controller-Job和Cronjob

Job和Cronjob 1、Job(一次性任务)2、CronJob(定时任务) 1、Job(一次性任务) [rootmaster controlleryaml]# cat job.yaml apiVersion: batch/v1 kind: Job metadata:name: pi spec:template:spec:contain…...

蓝桥杯每日一题2032.10.24

蓝桥杯大赛历届真题 - C 语言 B 组 - 蓝桥云课 (lanqiao.cn) 题目描述 题目分析 由于布局为两个字节为一行&#xff0c;那我们输入两个数就为一行&#xff0c;但是这两个数全部得用二进制进行表示使用bitset bitset:将一个数转化为二进制 bitset<8>:将一个数转化为8位…...

【AGC】更新应用信息报未知错误解决方法

【问题描述】 最近有几个开发者遇到了一个问题&#xff0c;他们在AGC控制台配置好应用信息的图标和截图之后&#xff0c;点击保存按钮会弹出“未知错误&#xff0c;请稍后再试”的异常报错&#xff0c;导致无法正确保存应用配置信息。 出错页面如图所示。 ​​ 【解决方案】 …...

一个注解让 Spring Boot 项目接口返回数据脱敏

1 背景 需求是某些接口返回的信息&#xff0c;涉及到敏感数据的必须进行脱敏操作 2 思路 ①要做成可配置多策略的脱敏操作&#xff0c;要不然一个个接口进行脱敏操作&#xff0c;重复的工作量太多&#xff0c;很显然违背了“多写一行算我输”的程序员规范。思来想去&#xff…...

测试人员的KPI怎么设置

关于测试部的KPI&#xff0c;简单列举下自己所经历部门的考核指标&#xff1a; 工作量。根据平时跟踪的需求&#xff0c;编写的用例&#xff0c;提交的bug数等综合评估&#xff1b; 负责项目的质量。上线项目是否出现重大功能的事故&#xff0c; 如果出现了事故&#xff0c;分…...

Databend 开源周报第 116 期

Databend 是一款现代云数仓。专为弹性和高效设计&#xff0c;为您的大规模分析需求保驾护航。自由且开源。即刻体验云服务&#xff1a;https://app.databend.cn 。 Whats On In Databend 探索 Databend 本周新进展&#xff0c;遇到更贴近你心意的 Databend 。 特性预览&#…...

mongodb-gridfs下载文件报Sort exceeded memory limit of 104857600 bytes异常

报错详细信息 com.mongodb.MongoQueryException: Query failed with error code 292 and error message Executor error during find command :: caused by :: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. on server 11.51.141.…...

分享一下微信小程序里怎么实现扫码点餐链接

在当今数字化时代&#xff0c;扫码点餐已经成为了餐饮行业的一种趋势。通过微信小程序&#xff0c;实现扫码点餐功能&#xff0c;可以为餐厅带来诸多便利和优势。本文将详细介绍如何在微信小程序中实现扫码点餐功能&#xff0c;帮助餐厅提高服务效率和质量&#xff0c;提升用户…...

安卓开发环境安装教程

在本教程中&#xff0c;我将向您介绍如何在Windows操作系统上安装Android开发环境。Android开发环境包括Java Development Kit&#xff08;JDK&#xff09;&#xff0c;Android Studio IDE和相应的SDK工具。跟随以下步骤&#xff0c;您将能够搭建安卓开发环境并开始开发自己的应…...

深入探究Selenium定位技巧及最佳实践

在使用Selenium进行Web自动化测试时&#xff0c;准确地定位元素是非常重要的一步。Selenium提供了多种元素定位方法&#xff0c;本文将深入探究这八大元素定位方法&#xff0c;帮助读者更好地理解和应用Selenium的定位技巧。 1. ID定位 ID是元素在HTML中的唯一标识符&#xff…...

如何正确安装psycopg2,No module named ‘psycopg2._psycopg‘解决

二、psycopg2安装方法 psycopg2可以通过多种方式安装&#xff0c;我们这里介绍两种常用的方式&#xff1a;通过pip安装和手动安装。 1、通过pip安装psycopg2 如果已经安装了pip&#xff0c;那么在命令行中输入以下命令即可完成psycopg2的安装&#xff1a; pip install psyc…...

go WriteFile文件追加写入(适合小文件)

go 在做文件追加写入时一般用os.OpenFile 指定 FileMode 为 os.O_APPEND. 如官方文档示例: f, err : os.OpenFile("access.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)if err ! nil {log.Fatal(err)}if _, err : f.Write([]byte("appended some data\n&…...

history 模式上线需要注意什么事项?

结论先行&#xff1a; 首先&#xff0c;需要在服务器上对所有的路由路径进行配置&#xff0c;避免在访问路由时出现 404 的情况&#xff1b; 其次&#xff0c;需要特别注意安全性和兼容性问题。 因为使用 History 模式会暴露出服务器上的文件路径&#xff0c;因此在部署时需要…...

VMware虚拟机安装Ubuntu22.04教程(2023最新最详细)

目录 简介 1 VMware虚拟机下载与安装 2 Ubuntu操作系统安装与配置 2.1 Ubuntu虚拟机配置 2.2 Ubuntu操作系统安装 简介 Linux是一种自由和开放源代码的操作系统内核&#xff0c;被广泛应用于各种计算机系统中。它以稳定性、安全性和灵活性而闻名&#xff0c;并成为服务器…...

yakit使用爆破编码明文_dnslog使用

yakit使用爆破编码密码 文章目录 yakit使用爆破编码密码yakit使用1 yakit编码密码进行爆破2 准备eval.php文件放入web3 访问http://192.168.225.206/eval.php,使用bp抓包,测试后环境准本好4 使用yakit4.1 进入页面&#xff0c;点击这里进行配置默认端口80834.2 发送到模糊测试4…...

3分钟教你用Python+Appium实现自动化测试

一、环境准备 1.脚本语言&#xff1a;Python3.x IDE&#xff1a;安装Pycharm 2.安装Java JDK 、Android SDK 3.adb环境&#xff0c;path添加E:\Software\Android_SDK\platform-tools 4.安装Appium for windows&#xff0c;官网地址 Redirecting 点击下载按钮会到GitHub…...

qt的一些自绘控件

https://download.csdn.net/download/venice0708/88469835...

类图表示法

设计模式&#xff0c;用设计图表示的话&#xff0c;主要用到类图。常见UML类图如下&#xff1a; 1、类图&#xff1a;矩形框&#xff0c;代表一个类&#xff08;Class&#xff09;。类图分为三层&#xff0c;第一层显示类的名称&#xff0c;如果是抽象类&#xff0c;则用斜体显…...

大模型训练框架

一文搞定分布式训练&#xff1a;dataparallel、distirbuted、deepspeed、accelerate、transformers、horovod - 知乎代码地址&#xff1a;taishan1994/pytorch-distributed-NLP: pytorch分布式训练 (github.com)pytorch-distributed-NLPpytorch单机多卡分布式训练-中文文本分类…...

51c自动驾驶~合集58

我自己的原文哦~ https://blog.51cto.com/whaosoft/13967107 #CCA-Attention 全局池化局部保留&#xff0c;CCA-Attention为LLM长文本建模带来突破性进展 琶洲实验室、华南理工大学联合推出关键上下文感知注意力机制&#xff08;CCA-Attention&#xff09;&#xff0c;…...

椭圆曲线密码学(ECC)

一、ECC算法概述 椭圆曲线密码学&#xff08;Elliptic Curve Cryptography&#xff09;是基于椭圆曲线数学理论的公钥密码系统&#xff0c;由Neal Koblitz和Victor Miller在1985年独立提出。相比RSA&#xff0c;ECC在相同安全强度下密钥更短&#xff08;256位ECC ≈ 3072位RSA…...

前端导出带有合并单元格的列表

// 导出async function exportExcel(fileName "共识调整.xlsx") {// 所有数据const exportData await getAllMainData();// 表头内容let fitstTitleList [];const secondTitleList [];allColumns.value.forEach(column > {if (!column.children) {fitstTitleL…...

Objective-C常用命名规范总结

【OC】常用命名规范总结 文章目录 【OC】常用命名规范总结1.类名&#xff08;Class Name)2.协议名&#xff08;Protocol Name)3.方法名&#xff08;Method Name)4.属性名&#xff08;Property Name&#xff09;5.局部变量/实例变量&#xff08;Local / Instance Variables&…...

《基于Apache Flink的流处理》笔记

思维导图 1-3 章 4-7章 8-11 章 参考资料 源码&#xff1a; https://github.com/streaming-with-flink 博客 https://flink.apache.org/bloghttps://www.ververica.com/blog 聚会及会议 https://flink-forward.orghttps://www.meetup.com/topics/apache-flink https://n…...

「全栈技术解析」推客小程序系统开发:从架构设计到裂变增长的完整解决方案

在移动互联网营销竞争白热化的当下&#xff0c;推客小程序系统凭借其裂变传播、精准营销等特性&#xff0c;成为企业抢占市场的利器。本文将深度解析推客小程序系统开发的核心技术与实现路径&#xff0c;助力开发者打造具有市场竞争力的营销工具。​ 一、系统核心功能架构&…...

软件工程 期末复习

瀑布模型&#xff1a;计划 螺旋模型&#xff1a;风险低 原型模型: 用户反馈 喷泉模型:代码复用 高内聚 低耦合&#xff1a;模块内部功能紧密 模块之间依赖程度小 高内聚&#xff1a;指的是一个模块内部的功能应该紧密相关。换句话说&#xff0c;一个模块应当只实现单一的功能…...

CppCon 2015 学习:Time Programming Fundamentals

Civil Time 公历时间 特点&#xff1a; 共 6 个字段&#xff1a; Year&#xff08;年&#xff09;Month&#xff08;月&#xff09;Day&#xff08;日&#xff09;Hour&#xff08;小时&#xff09;Minute&#xff08;分钟&#xff09;Second&#xff08;秒&#xff09; 表示…...

密码学基础——SM4算法

博客主页&#xff1a;christine-rr-CSDN博客 ​​​​专栏主页&#xff1a;密码学 &#x1f4cc; 【今日更新】&#x1f4cc; 对称密码算法——SM4 目录 一、国密SM系列算法概述 二、SM4算法 2.1算法背景 2.2算法特点 2.3 基本部件 2.3.1 S盒 2.3.2 非线性变换 ​编辑…...

【大模型】RankRAG:基于大模型的上下文排序与检索增强生成的统一框架

文章目录 A 论文出处B 背景B.1 背景介绍B.2 问题提出B.3 创新点 C 模型结构C.1 指令微调阶段C.2 排名与生成的总和指令微调阶段C.3 RankRAG推理&#xff1a;检索-重排-生成 D 实验设计E 个人总结 A 论文出处 论文题目&#xff1a;RankRAG&#xff1a;Unifying Context Ranking…...