openEuler 22.03 LTS 环境使用 Docker Compose 一键部署 JumpServer (all-in-one 模式)

环境回顾

上一篇文章中,我们讲解了 openEuler 22.03 LTS 安装 Docker CE 和 Dcoker Compose,部署的软件环境版本分别如下:

  • OS 系统openEuler 22.03 LTS(openEuler-22.03-LTS-x86_64-dvd.iso)
  • Docker EngineDocker CE(Docker Engine - Community v24.0.6)
  • Docker ComposeDocker Compose v2.21.0

接着上面部署的环境,我们继续讲解如何使用 docker compose 一键部署 JumpServer (all-in-one 模式)。
docker-compose

Compose 部署步骤

编排文件是使用 Docker Compose 的核心,支持 compose.yaml 或者compose.yml 作为默认名称,也向后兼容 docker-compose.yamldocker-compose.yml,如果这些文件都存在则首选 compose.yaml。你也可以使用其他名称,只是需要在启动的时候指定文件名。

  • Docker EngineCompose 版本支持列表
Compose file formatDocker Engine release
Compose specification19.03.0+
3.819.03.0+
3.718.06.0+
3.618.02.0+
3.517.12.0+
3.417.09.0+
3.317.06.0+
3.217.04.0+
3.11.13.1+
3.01.13.0+
2.417.12.0+
2.317.06.0+
2.21.13.0+
2.11.12.0+
2.01.10.0+

关于 dockercompose 支持矩阵更多信息,请查看官方文档 https://docs.docker.com/compose/compose-file/compose-file-v3/

1、compose healthcheck 举例

关于 mariadb docker compose healthcheck 配置说明:

Docker Compose 可以通过在 docker-compose.yml 文件中设置 healthcheck 配置来检查 MariaDB 容器的健康状态。

docker-compose.yml 中,可以在 services.mariadb 配置下添加 healthcheck

services:mariadb:image: mariadb:latesthealthcheck:test: ["CMD-SHELL", "mysqladmin ping --silent"]interval: 30stimeout: 10sretries: 3

在这个例子中,我们使用了 mysqladmin ping 命令来检查 MariaDB 是否健康。如果 MariaDB 返回了 “mysqld is alive”,则视为健康,否则视为不健康。间隔 30s 检查一次,超时 10s,如果失败 3次 就认为 unhealthy

注意:如果 MariaDB 容器内部没有安装 mysqladmin 命令,这个健康检查将失败。

2、编写 Compose.yaml 文件

编写 jumpserver-allinone-compose.yaml 文件信息如下:

version: '3.8'
services:mariadb:image: mariadb:10.11container_name: jms_mariadbrestart: alwayscommand: --log-bin --log-basename=mariadb --character-set-server=utf8mb4 --collation-server=utf8mb4_general_cienvironment:DB_PORT: ${DB_PORT:-3306}MARIADB_ROOT_PASSWORD: ${DB_PASSWORD:-My123456}MARIADB_DATABASE: ${DB_NAME:-jumpserver}TZ: "Asia/Shanghai"ports:- 3306:3306healthcheck:test: "mysql -h 127.0.0.1 -u root -p $$MARIADB_ROOT_PASSWORD -e 'SHOW DATABASES;'"interval: 10stimeout: 5sretries: 3start_period: 30svolumes:- ${VOLUME_DIR:-./jms_data}/mariadb/data:/var/lib/mysqlnetworks:- netredis:image: redis:6.2container_name: jms_redisrestart: alwayscommand: redis-server --requirepass ${REDIS_PASSWORD:-Rds123456} --loglevel warning --maxmemory-policy allkeys-lruenvironment:REDIS_PORT: ${REDIS_PORT:-6379}REDIS_PASSWORD: ${REDIS_PASSWORD:-Rds123456}ports:- 6379:6379healthcheck:test: "redis-cli -h 127.0.0.1 -p $$REDIS_PORT -a $$REDIS_PASSWORD info Replication"interval: 10stimeout: 5sretries: 3start_period: 10svolumes:- ${VOLUME_DIR:-./jms_data}/redis/data:/datanetworks:- netjumpserver:image: jumpserver/jms_all:${VERSION:-latest}build:context: .dockerfile: Dockerfilecontainer_name: jms_allprivileged: truerestart: alwaysenvironment:SECRET_KEY: ${SECRET_KEY:-vYneAbsXUhe4BghEeedNL7nfWLwaTTmhnwQMvjYOIG25Ofzghk}BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN:-K1ffDfLSIK8SV2PZj6VaxOiv8KuawlJK}DEBUG: ${DEBUG:-FALSE}LOG_LEVEL: ${LOG_LEVEL:-ERROR}DB_HOST: ${DB_HOST:-mysql}DB_PORT: ${DB_PORT:-3306}DB_USER: ${DB_USER:-root}DB_PASSWORD: ${DB_PASSWORD:-My123456}DB_NAME: ${DB_NAME:-jumpserver}REDIS_HOST: ${REDIS_HOST:-redis}REDIS_PORT: ${REDIS_PORT:-6379}REDIS_PASSWORD: ${REDIS_PASSWORD:-Rds123456}MAGNUS_MYSQL_PORT: ${MAGNUS_MYSQL_PORT:-33061}MAGNUS_MARIADB_PORT: ${MAGNUS_MARIADB_PORT:-33062}MAGNUS_REDIS_PORT: ${MAGNUS_REDIS_PORT:-63790}ports:- ${HTTP_PORT:-80}:80/tcp- ${SSH_PORT:-2222}:2222/tcp- ${MAGNUS_MYSQL_PORT:-33061}:33061/tcp- ${MAGNUS_MARIADB_PORT:-33062}:33062/tcp- ${MAGNUS_REDIS_PORT:-63790}:63790/tcpdepends_on:mariadb:condition: service_healthyredis:condition: service_healthyhealthcheck:test: "curl -fsL http://localhost/api/health/ > /dev/null"interval: 10stimeout: 5sretries: 3start_period: 90svolumes:- ${VOLUME_DIR:-./jms_data}/core/data:/opt/jumpserver/core/data- ${VOLUME_DIR:-./jms_data}/koko/data:/opt/jumpserver/koko/data- ${VOLUME_DIR:-./jms_data}/lion/data:/opt/jumpserver/lion/data- ${VOLUME_DIR:-./jms_data}/magnus/data:/opt/jumpserver/magnus/data- ${VOLUME_DIR:-./jms_data}/chen/data:/opt/jumpserver/chen/data- ${VOLUME_DIR:-./jms_data}/kael/data:/opt/jumpserver/kael/data- ${VOLUME_DIR:-./jms_data}/nginx/data:/var/log/nginxnetworks:- netnetworks:net:

3、执行 Compose 命令

查看 docker compose 命令:

[root@jumpServer ~]# docker compose --helpUsage:  docker compose [OPTIONS] COMMANDDefine and run multi-container applications with Docker.Options:--ansi string                Control when to print ANSI control characters ("never"|"always"|"auto")(default "auto")--compatibility              Run compose in backward compatibility mode--dry-run                    Execute command in dry run mode--env-file stringArray       Specify an alternate environment file.-f, --file stringArray           Compose configuration files--parallel int               Control max parallelism, -1 for unlimited (default -1)--profile stringArray        Specify a profile to enable--progress string            Set type of progress output (auto, tty, plain, quiet) (default "auto")--project-directory string   Specify an alternate working directory(default: the path of the, first specified, Compose file)-p, --project-name string        Project nameCommands:build       Build or rebuild servicesconfig      Parse, resolve and render compose file in canonical formatcp          Copy files/folders between a service container and the local filesystemcreate      Creates containers for a service.down        Stop and remove containers, networksevents      Receive real time events from containers.exec        Execute a command in a running container.images      List images used by the created containerskill        Force stop service containers.logs        View output from containersls          List running compose projectspause       Pause servicesport        Print the public port for a port binding.ps          List containerspull        Pull service imagespush        Push service imagesrestart     Restart service containersrm          Removes stopped service containersrun         Run a one-off command on a service.start       Start servicesstop        Stop servicestop         Display the running processesunpause     Unpause servicesup          Create and start containersversion     Show the Docker Compose version informationwait        Block until the first service container stopsRun 'docker compose COMMAND --help' for more information on a command.
  • 指定 jumpserver-allinone-compose.yaml 文件执行命令快速部署:
docker compose -f jumpserver-allinone-compose.yaml up -d 

执行此步骤耐心等待,正常情况输出如下信息:

[root@jumpServer ~]# docker compose -f jumpserver-allinone-compose.yaml up -d 
[+] Running 51/51✔ jumpserver 34 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                         1597.9s ✔ b70638ed4228 Pull complete                                                                               26.3s ✔ 1671b05d5ff8 Pull complete                                                                               14.2s ✔ cf6d41d3b58e Pull complete                                                                               15.3s ✔ 4658ace5181e Pull complete                                                                               26.8s ✔ 7d89f2b712aa Pull complete                                                                               19.0s ✔ 27f0595597bf Pull complete                                                                             1371.3s ✔ 5e1c9213656f Pull complete                                                                               30.6s ✔ 6b08cbabd196 Pull complete                                                                               59.3s ✔ d5e6b8f645d0 Pull complete                                                                               33.5s ✔ e61f3aac1553 Pull complete                                                                               35.3s ✔ 38e8b0b2cb1d Pull complete                                                                               37.2s ✔ 4f4fb700ef54 Pull complete                                                                              106.2s ✔ 0c2dc397c237 Pull complete                                                                              153.2s ✔ fdf489862f49 Pull complete                                                                              115.6s ✔ 7d15347457c2 Pull complete                                                                              122.3s ✔ 9ee083a8a7ed Pull complete                                                                              127.2s ✔ 3028c2686750 Pull complete                                                                              134.0s ✔ 5c15a5371a5f Pull complete                                                                              136.6s ✔ df85ed73d9c7 Pull complete                                                                              175.0s ✔ 0fbce6cdb40f Pull complete                                                                              180.1s ✔ 58780c9b73c1 Pull complete                                                                              430.0s ✔ 8370e2af9b40 Pull complete                                                                              185.8s ✔ cd0ff3c5c678 Pull complete                                                                              205.5s ✔ 46772bf55cde Pull complete                                                                              222.4s ✔ e58fedb6f561 Pull complete                                                                              227.6s ✔ 361691cd930c Pull complete                                                                              257.6s ✔ 181b8c1b3ce9 Pull complete                                                                              274.7s ✔ 282738152c09 Pull complete                                                                              291.6s ✔ 9b9cbb19c5bf Pull complete                                                                              299.0s ✔ 0256f5cdf016 Pull complete                                                                              314.0s ✔ bdf2050c3e51 Pull complete                                                                              315.9s ✔ 34b12bf59808 Pull complete                                                                              331.0s ✔ 1676acb3a378 Pull complete                                                                              344.4s ✔ c009086876be Pull complete                                                                              346.3s ✔ mariadb 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                        484.5s ✔ 7a2c55901189 Pull complete                                                                              370.2s ✔ 7eb404fb6599 Pull complete                                                                              385.5s ✔ b82494ba74d0 Pull complete                                                                              391.6s ✔ c12aefc63360 Pull complete                                                                              394.9s ✔ 755d4f319cad Pull complete                                                                              397.0s ✔ 3a356b485f3e Pull complete                                                                              429.8s ✔ 58cecd92a800 Pull complete                                                                              442.3s ✔ 1a788b911657 Pull complete                                                                              442.4s ✔ redis 6 layers [⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                            520.5s ✔ a378f10b3218 Pull complete                                                                              454.1s ✔ a18aae639f26 Pull complete                                                                              447.5s ✔ cc636628b1d6 Pull complete                                                                              451.5s ✔ 28d286c885bb Pull complete                                                                              458.1s ✔ eb5d7888e466 Pull complete                                                                              456.4s ✔ 94ae6bcf7a05 Pull complete                                                                              471.0s 
[+] Running 4/4✔ Network root_net       Created                                                                              7.2s ✔ Container jms_mariadb  Healthy                                                                              5.6s ✔ Container jms_redis    Healthy                                                                              5.6s ✔ Container jms_all      Created                                                                              2.0s 
...

如果出现如下错误信息:

说明:该问题已经反馈 github issues,请查看https://github.com/jumpserver/jumpserver/issues/11983

 [+] Running 4/4✔ Network root_net       Created                                                           7.2s ✘ Container jms_mariadb  Error                                                             5.6s✔ Container jms_redis    Healthy                                                           5.6s ✔ Container jms_all      Created                                                           2.0s 
dependency failed to start: container jms_mariadb is unhealthy

继续查看 168b11c99368 mariadb:10.11 容器日志信息:

[root@jumpServer ~]# docker container ls
CONTAINER ID   IMAGE           COMMAND                   CREATED              STATUS                          PORTS                                       NAMES
168b11c99368   mariadb:10.11   "docker-entrypoint.s…"   About a minute ago   Up About a minute (unhealthy)   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp   jms_mariadb
a1a18950bf2c   redis:6.2       "docker-entrypoint.s…"   About a minute ago   Up About a minute (healthy)     0.0.0.0:6379->6379/tcp, :::6379->6379/tcp   jms_redis
[root@jumpServer ~]# docker container logs 168b11c99368
2023-10-25 22:27:25+08:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.5+maria~ubu2204 started.
2023-10-25 22:27:26+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-10-25 22:27:26+08:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.5+maria~ubu2204 started.
2023-10-25 22:27:26+08:00 [Note] [Entrypoint]: Initializing database filesPLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following command:'/usr/bin/mariadb-secure-installation'which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.See the MariaDB Knowledgebase at https://mariadb.com/kbPlease report any problems at https://mariadb.org/jiraThe latest information about MariaDB is available at https://mariadb.org/.Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/2023-10-25 22:28:35+08:00 [Note] [Entrypoint]: Database files initialized
2023-10-25 22:28:35+08:00 [Note] [Entrypoint]: Starting temporary server
2023-10-25 22:28:35+08:00 [Note] [Entrypoint]: Waiting for server startup
2023-10-25 22:28:35 0 [Note] Starting MariaDB 10.11.5-MariaDB-1:10.11.5+maria~ubu2204-log source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 141
2023-10-25 22:28:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-10-25 22:28:36 0 [Note] InnoDB: Number of transaction pools: 1
2023-10-25 22:28:36 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-10-25 22:28:36 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-10-25 22:28:36 0 [Note] InnoDB: Using liburing
2023-10-25 22:28:36 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-10-25 22:28:36 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-25 22:28:36 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2023-10-25 22:28:36 0 [Note] InnoDB: End of log at LSN=46438
2023-10-25 22:28:36 0 [Note] InnoDB: 128 rollback segments are active.
2023-10-25 22:28:36 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-10-25 22:28:36 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-10-25 22:28:36 0 [Note] InnoDB: log sequence number 46438; transaction id 14
2023-10-25 22:28:36 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-10-25 22:28:37 0 [Warning] 'user' entry 'root@168b11c99368' ignored in --skip-name-resolve mode.
2023-10-25 22:28:37 0 [Warning] 'proxies_priv' entry '@% root@168b11c99368' ignored in --skip-name-resolve mode.
2023-10-25 22:28:37 0 [Note] mariadbd: ready for connections.
Version: '10.11.5-MariaDB-1:10.11.5+maria~ubu2204-log'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
2023-10-25 22:28:38+08:00 [Note] [Entrypoint]: Temporary server started.
2023-10-25 22:28:47+08:00 [Note] [Entrypoint]: Creating database jumpserver
2023-10-25 22:28:47+08:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)2023-10-25 22:28:48+08:00 [Note] [Entrypoint]: Stopping temporary server
2023-10-25 22:28:48 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
2023-10-25 22:28:48 0 [Note] InnoDB: FTS optimize thread exiting.
2023-10-25 22:28:49 0 [Note] InnoDB: Starting shutdown...
2023-10-25 22:28:49 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2023-10-25 22:28:49 0 [Note] InnoDB: Buffer pool(s) dump completed at 231025 22:28:49
2023-10-25 22:28:50 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2023-10-25 22:28:50 0 [Note] InnoDB: Shutdown completed; log sequence number 46438; transaction id 15
2023-10-25 22:28:50 0 [Note] mariadbd: Shutdown complete2023-10-25 22:28:50+08:00 [Note] [Entrypoint]: Temporary server stopped2023-10-25 22:28:50+08:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.2023-10-25 22:28:50 0 [Note] Starting MariaDB 10.11.5-MariaDB-1:10.11.5+maria~ubu2204-log source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1
2023-10-25 22:28:50 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-10-25 22:28:50 0 [Note] InnoDB: Number of transaction pools: 1
2023-10-25 22:28:50 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-10-25 22:28:50 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-10-25 22:28:50 0 [Note] InnoDB: Using liburing
2023-10-25 22:28:50 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-10-25 22:28:50 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-25 22:28:50 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes)
2023-10-25 22:28:50 0 [Note] InnoDB: End of log at LSN=46438
2023-10-25 22:28:50 0 [Note] InnoDB: 128 rollback segments are active.
2023-10-25 22:28:50 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-10-25 22:28:50 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-10-25 22:28:50 0 [Note] InnoDB: log sequence number 46438; transaction id 14
2023-10-25 22:28:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-10-25 22:28:50 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-10-25 22:28:50 0 [Note] InnoDB: Buffer pool(s) load completed at 231025 22:28:50
2023-10-25 22:28:50 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-10-25 22:28:50 0 [Note] Server socket created on IP: '::'.
2023-10-25 22:28:51 0 [Note] mariadbd: ready for connections.
Version: '10.11.5-MariaDB-1:10.11.5+maria~ubu2204-log'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

继续进入容器查看:

docker 进入当前正在运行容器的两种方式(exec 和 attach 的区别),https://blog.csdn.net/Starrysky_LTL/article/details/121168670

在这里插入图片描述

  • 测试完毕后清理环境:
docker compose -f jumpserver-allinone-compose.yaml down -v

输出如下信息:

[root@jumpServer ~]# docker compose -f jumpserver-allinone-compose.yaml down
[+] Running 4/4✔ Container jms_all      Removed                                                                              0.0s ✔ Container jms_mariadb  Removed                                                                              5.2s ✔ Container jms_redis    Removed                                                                              5.0s ✔ Network root_net       Removed                                                                              1.1s 

4、查看 Docker 镜像

通过 compose.yaml 文件拉取的 docker 镜像(image)如下:

[root@jumpServer ~]# docker image ls
REPOSITORY           TAG       IMAGE ID       CREATED       SIZE
jumpserver/jms_all   latest    a4428decf662   4 days ago    3.48GB
redis                6.2       81f00da770d8   6 days ago    127MB
mariadb              10.11     3b3ad3b80a5c   11 days ago   395MB

验证 JumpServer 安装

浏览器查看 JumpServer

  • 地址:http://<JumpServer服务器IP地址>:<服务运行端口>
  • 用户名:admin
  • 密码:admin

首次登陆需要修改初始密码,修改后再次登录即可进入系统。

在这里插入图片描述

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

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

相关文章

归并排序(java)

大家好我是苏麟 , 今天说说归并排序 . 归并排序 递归 正式学习归并排序之前&#xff0c;我们得先学习一下递归算法。 定义&#xff1a; 定义方法时&#xff0c;在方法内部调用方法本身&#xff0c;称之为递归. public void show(){System.out.println("aaaa")…

软考高级系统架构师冲关预测

[ – 2023年10月27日 – ] 去年11月通过了软考高级系统架构师的考试&#xff0c;原本想立即分享下过关的总结回顾&#xff0c;但是随着软考新版大纲及教程的发布&#xff0c;也意味着题目及内容的复盘总结经验便不那么适用。在即将迎来今年的软考高架的时候&#xff0c;想着透…

Azure - 机器学习企业级服务概述与介绍

目录 一、什么是 Azure 机器学习&#xff1f;大规模生成业务关键型机器学习模型 二、Azure 机器学习适合哪些人群&#xff1f;三、Azure 机器学习的价值点加快价值实现速度协作并简化 MLOps信心十足地开发负责任地设计 四、端到端机器学习生命周期的支持准备数据生成和训练模型…

k8s statefulSet 学习笔记

文章目录 缩写: stsweb-sts.yaml创建sts扩缩容金丝雀发布OnDelete 删除时更新 缩写: sts 通过 kubectl api-resources 可以查到&#xff1a; NAMESHORTNAMESAPIVERSIONNAMESPACEDKINDstatefulsetsstsapps/v1trueStatefulSet web-sts.yaml apiVersion: v1 kind: Service met…

LabVIEW开发TDS1000 和TDS2000 系列泰克示波器

LabVIEW开发TDS1000 和TDS2000 系列泰克示波器 泰克示波器是经常用到的工具&#xff0c;一般手动操作即可&#xff0c;但有时候也要集成到系统中&#xff0c;需要程控。这时候先要下载厂家提供的例子&#xff0c;了解LabVIEW的demo。根据不用的示波器型号&#xff0c;选择和计…

【SpringCloudNetflix】一图理解Spring Cloud Netflix解决了那些微服务问题?

什么是微服务理解&#xff1a; SpringCloudNetflix解决的问题理解&#xff1a; SpringCloudNetflix核心点&#xff1a; 注册中心&#xff1a;Eureka负载均衡&#xff1a;Ribbon、Feign服务熔断&#xff1a;Hystrix服务降级&#xff1a;Hystrix服务监控&#xff1a;Hystrix Da…

CSS 滚动驱动动画与 @keyframes 新语法

CSS 滚动驱动动画与 keyframes 在 CSS 滚动驱动动画相关的属性出来之后, keyframes 也迎来变化. 以前, keyframes 的值可以是 from, to, 或者百分数. 现在它多了一种属性的值 <timeline-range-name> <percentage> 建议先了解 animation-range 不然你会对 timeli…

高三高考免费试卷真题押题知识点合集

发表于安徽 温馨提示&#xff1a;有需要的真题试卷可联系本人&#xff0c;百卷内上免费资源。 感觉有用的下方三连&#xff0c;谢谢 ​ 。 免费版卷有6-60卷每卷平均4-30页 高三免费高三地理高三英语高三化学高三物理高三语文高三历史高三政治高三数学高三生物 付费版卷有1…

Linux shell编程学习笔记15:定义数组、获取数组元素值和长度

一、 Linux shell 脚本编程中的数组概述 数组是一种常见的数据结构。跟大多数编程语言一样&#xff0c;大多数Linux shell脚本支持数组&#xff0c;但对数组的支持程度各不相同&#xff0c;比如数组的维度&#xff0c;是支持一维数组还是多维数组&#xff1f;再如&#xff0c;…

[Docker]三.Docker 部署nginx,以及映射端口,挂载数据卷

一.Docker 部署 Nginx 以及端口映射 Docker 部署 Nginx,首先需要下载nginx镜像,然后启动这个镜像,就运行了一个nginx的容器了 1.下载 nginx 镜像并启动容器 #查看是否存在nginx镜像:发现没有nginx镜像 [rootlocalhost zph]# docker images | grep nginx#下载nginx镜像 [rootl…

IO流框架,缓冲流

一.缓冲流有什么优点 Java中的缓冲流&#xff08;Buffered Stream&#xff09;具有以下优势&#xff1a; 提高效率&#xff1a;缓冲流通过在内存中缓存一部分数据&#xff0c;减少了直接从内存到磁盘或从磁盘到内存的频繁IO操作&#xff0c;从而提高了读写效率。缓冲区大小调整…

Java8与JDK1.8与JDK8之间的关系是什么?

1.Java8等价于JDK8 2.JDK8或者JDK1.8是由于自从JDK1.5/JDK5命名方式改变后遗留的历史问题。所以JDK8或者JDK1.8是等价的。 2004年9月30日&#xff0c;J2SE1.5发布。为了表示该版本的重要性&#xff0c;J2SE 1.5更名为Java SE 5.0&#xff0c;从此开始&#xff0c;如下图像jav…

C++之#pragma once实例总结(二百四十七)

简介&#xff1a; CSDN博客专家&#xff0c;专注Android/Linux系统&#xff0c;分享多mic语音方案、音视频、编解码等技术&#xff0c;与大家一起成长&#xff01; 优质专栏&#xff1a;Audio工程师进阶系列【原创干货持续更新中……】&#x1f680; 人生格言&#xff1a; 人生…

OpenCV官方教程中文版 —— 直方图的计算,绘制与分析

OpenCV官方教程中文版 —— 直方图的计算&#xff0c;绘制与分析 前言一、原理1.统计直方图2. 绘制直方图3. 使用掩模 前言 • 使用 OpenCV 或 Numpy 函数计算直方图 • 使用 Opencv 或者 Matplotlib 函数绘制直方图 • 将要学习的函数有&#xff1a;cv2.calcHist()&#xf…

二叉树:有了如此高效的散列表,为什么还需要二叉树?

文章来源于极客时间前google工程师−王争专栏。 上一节我们学习了树、二叉树以及二叉树的遍历&#xff0c;今天我们再来学习一种特殊的的二叉树&#xff0c;二叉查找树。二叉查找树最大的特点就是&#xff0c;支持动态数据集合的快速插入、删除、查找操作。 我们之前说过&…

StripedFly恶意软件框架感染了100万台Windows和Linux主机

导语 近日&#xff0c;一款名为StripedFly的恶意软件框架在网络安全研究人员的监视之外悄然感染了超过100万台Windows和Linux系统。这款跨平台的恶意软件平台在过去的五年中一直未被察觉。在去年&#xff0c;卡巴斯基实验室发现了这个恶意框架的真实本质&#xff0c;并发现其活…

设计高信度和效度的问卷:关键要点与技巧

设计调查问卷是任何研究过程中至关重要的一部分&#xff0c;无论是出于学术目的还是商业目的。调查是用于收集数据的常用工具&#xff0c;它们可以为消费者行为、意见、客户满意度和其他重要因素提供有价值的见解。然而&#xff0c;调查的可靠性和有效性对于确保收集的数据准确…

WireShark使用入门

背景 Wireshark&#xff0c;又被称为网络封包分析软件&#xff0c;是一种开源且功能十分强大的工具。该工具的主要功能是截取各种网络封包&#xff0c;并尽可能显示出最为详细的网络封包资料。它使用WinPCAP作为接口&#xff0c;直接与网卡进行数据报文交换。 Wireshark支持W…

SpringCloudAlibaba实战-nacos集群部署

写在前面&#xff1a;在学习阶段&#xff0c;我们想快速学习SpringCloudAlibaba功能&#xff0c;但总是花费大量时间跟着视频或博客做组件配置。由于版本的更迭&#xff0c;我们学习时的组件版本很可能和作者的不一致&#xff0c;又或者是各自环境不一&#xff0c;只能一坑又一…