第13章 Docker 中 Redis 的安装与配置

文章目录

  • 第13章 Docker 中 Redis 的安装与配置
    • 前言
    • 目标
    • 环境
    • 安装
      • Supported tags and respective `Dockerfile` links
      • 查找镜像
      • 下载镜像
      • 启动redis实例
      • 从持久存储开始
      • 从应用程序连接到它
      • ......或通过redis-cli
      • 另外,如果你想使用自己的redis.conf ......
      • 打开访问端口
      • `32bit` variant
        • Redis模块
        • Image Variants
      • `redis:`
      • `redis:alpine`
    • License
    • 制作符合自己的镜像
      • 保存当前容器
      • 创建redis.conf配置文件
      • 创建新镜像
      • 构建镜像
      • 启动实例容器
    • 直接传递配置文件参数启动一个redis实例
    • 连接到redis容器
    • 连接到redis容器

前言

  • 为什么要使用 Redis?

具体请参考官网介绍,地址:https://redis.io/

  • 什么是 Redis?

Redis是一个开源的、联网的、内存中的键值数据存储,具有可选的持久性。它是用ANSI C编写的.Redis的开发由Redis Labs今天赞助;在此之前,它由Pivotal和VMware赞助。根据DB-Engines.com的月度排名,Redis是最受欢迎的键值存储。 Redis这个名字意味着REmote DIctionary Server。

wikipedia.org/wiki/Redis

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ejuPCrfr-1599611890507)(assets/logo-1534067674001.png)]

  • 什么是 Docker?

具体请参考我的第08章内容。

  • 为什么要在 Docker 中安装 Redis?

为了开发环境一致性、可移植性、易于管理和维护性。

目标

  • 完成 Redis 在 Docker 中的安装与配置。
  • 安装在 Docker 中的 Redis 能正常对外提供服务。
  • 在外部开发、测试和生产环境中能正常访问和使用 Redis 缓存服务。

环境

  • **VMware:**VMware Workstation 14 Pro
  • **Linux:**CentOS7.4
  • **Docker:**18.06.0-ce, build 0ffa825
  • **Redis:**3.2.12
  • **JDK:**jdk1.8.0_172

安装

Redis是一个开源键值存储,用作数据结构服务器。

如何使用镜像安装?

Supported tags and respective Dockerfile links

  • 5.0-rc4, 5.0-rc, 5.0-rc4-stretch, 5.0-rc-stretch (5.0-rc/Dockerfile)
  • 5.0-rc4-32bit, 5.0-rc-32bit, 5.0-rc4-32bit-stretch, 5.0-rc-32bit-stretch (5.0-rc/32bit/Dockerfile)
  • 5.0-rc4-alpine, 5.0-rc-alpine, 5.0-rc4-alpine3.8, 5.0-rc-alpine3.8 (5.0-rc/alpine/Dockerfile)
  • 4.0.11, 4.0, 4, latest, 4.0.11-stretch, 4.0-stretch, 4-stretch, stretch (4.0/Dockerfile)
  • 4.0.11-32bit, 4.0-32bit, 4-32bit, 32bit, 4.0.11-32bit-stretch, 4.0-32bit-stretch, 4-32bit-stretch, 32bit-stretch (4.0/32bit/Dockerfile)
  • 4.0.11-alpine, 4.0-alpine, 4-alpine, alpine, 4.0.11-alpine3.8, 4.0-alpine3.8, 4-alpine3.8, alpine3.8 (4.0/alpine/Dockerfile)
  • 3.2.12, 3.2, 3, 3.2.12-stretch, 3.2-stretch, 3-stretch (3.2/Dockerfile)
  • 3.2.12-32bit, 3.2-32bit, 3-32bit, 3.2.12-32bit-stretch, 3.2-32bit-stretch, 3-32bit-stretch (3.2/32bit/Dockerfile)
  • [3.2.12-alpine, 3.2-alpine, 3-alpine, 3.2.12-alpine3.8, 3.2-alpine3.8, 3-alpine3.8(3.2/alpine/Dockerfile)

查找镜像

$ sudo docker search redis

下载镜像

$ sudo docker pull redis:3.2.12

启动redis实例

$ sudo docker run --name redis -p 6379:6379 -d redis:3.2.12

此镜像包含EXPOSE 6379(redis端口),因此标准容器链接将使其自动可用于链接容器(如以下示例所示)。

从持久存储开始

$ sudo docker run --name some-redis -d redis redis-server --appendonly yes

如果启用了持久性,则数据存储在VOLUME /data中,可以与--volumes-from some-volume-container-v /docker/host/dir:/data一起使用(请参阅docs.docker volumes )。

有关Redis Persistence的更多信息,请参阅http://redis.io/topics/persistence。

从应用程序连接到它

$ sudo docker run --name some-app --link some-redis:redis -d application-that-uses-redis

…或通过redis-cli

$ sudo docker run -it --link some-redis:redis --rm redis redis-cli -h redis -p 6379

另外,如果你想使用自己的redis.conf …

您可以创建自己的Dockerfile,将上下文中的redis.conf添加到/data/中,就像这样。

FROM redis
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]

或者,您可以使用docker run选项在同一行中指定某些内容。

$ sudo docker run -v /myredis/conf/redis.conf:/usr/local/etc/redis/redis.conf --name myredis -p 6379:6379 -d redis:3.2.12

其中/myredis/conf/是包含redis.conf文件的本地目录。使用此方法意味着您不需要为redis容器安装Dockerfile。

打开访问端口

$ sudo firewall-cmd --zone=public --add-port=6379/tcp --permanent 
## 重启防火墙
$ sudo firewall-cmd --reload 
$ sudo firewall-cmd --list-port

32bit variant

此变体不是32位镜像(并且不会在32位硬件上运行),但包括Redis编译为32位二进制文件,尤其适用于需要降低内存要求的用户。有关详细信息,请参阅Redis文档中的“使用32位实例 “Using 32 bit instances””。

Redis模块

您可以在redis.io or on redismodules.com.  上找到Redis的模块列表。可在此处找到一些标准模块:

  • RediSearch :使用Redis上的索引进行搜索和查询
  • ReJSON :Redis的扩展JSON处理
  • ReBloom :Bloom过滤Redis上成员资格/存在搜索的数据类型

Image Variants

redis镜像有多种口味,每种都是针对特定用例而设计的。

redis:<version>

这是事实上的形象。如果您不确定您的需求是什么,您可能想要使用这个。它被设计为既可以用作丢弃容器(安装源代码并启动容器来启动应用程序),也可以用作构建其他镜像的基础。

redis:alpine

此图片基于阿尔卑斯官方镜像中流行的 Alpine Linux project 。the alpine official image 比大多数分发基础镜像(约5MB)小得多,因此通常会导致更细的镜像。

当希望最终镜像尺寸尽可能小时,强烈建议使用此变体。需要注意的主要注意事项是它确实使用 musl libc  而不是 glibc and friends ,因此某些软件可能会遇到问题,具体取决于其libc要求的深度。但是,大多数软件都没有这个问题,因此这种变体通常是一个非常安全的选择。有关可能出现的问题的更多讨论以及使用基于Alpine的镜像的一些比较/比较,请参阅 this Hacker News comment thread 。

为了最小化镜像大小,在基于Alpine的镜像中包含其他相关工具(例如git或bash)的情况并不常见。使用此镜像作为基础,在您自己的Dockerfile中添加所需的内容(如果您不熟悉,请参阅alpine image description 以获取如何安装软件包的示例)。

License

View license information for the software contained in this image.

与所有Docker映像一样,这些映像也可能包含其他许可证(例如来自基本分发版的Bash等,以及所包含的主要软件的任何直接或间接依赖关系)。

Some additional license information which was able to be auto-detected might be found in the repo-inforepository’s redis/ directory.

对于任何预先构建的镜像使用,镜像用户有责任确保对此镜像的任何使用都符合其中包含的所有软件的任何相关许可。

制作符合自己的镜像

根据当前安装和配置的redis容器创建一个新的镜像。

保存当前容器

$ sudo docker commit e220bf686d90 myredis:1
sha256:c578c13c662782feb5b78d8148ab22e3fda1ab82404928eff5cfb3f23e43256a#提交通过容器建立镜像,参数解释:
myredis:标示仓库名
1:是TAG名字  

创建redis.conf配置文件

redis默认是没有配置的,需要手动加配置,然后后面加上配置。

#创建一个目录
$ sudo mkdir redis && cd redis
#创建配置文件
$ sudo touch redis.conf

编辑redis.conf配置文件 $sudo vim redis.conf

# Redis配置文件样例# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.# Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程
# 启用守护进程后,Redis会把pid写到一个pidfile中,在/var/run/redis.pid
daemonize no# 当Redis以守护进程方式运行时,Redis默认会把pid写入/var/run/redis.pid文件,可以通过pidfile指定
pidfile /var/run/redis.pid# 指定Redis监听端口,默认端口为6379
# 如果指定0端口,表示Redis不监听TCP连接
port 6379# 绑定的主机地址
# 你可以绑定单一接口,如果没有绑定,所有接口都会监听到来的连接
# bind 127.0.0.1# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
# unixsocket /tmp/redis.sock
# unixsocketperm 755# 当客户端闲置多长时间后关闭连接,如果指定为0,表示关闭该功能
timeout 0# 指定日志记录级别,Redis总共支持四个级别:debug、verbose、notice、warning,默认为verbose
# debug (很多信息, 对开发/测试比较有用)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel verbose# 日志记录方式,默认为标准输出,如果配置为redis为守护进程方式运行,而这里又配置为标准输出,则日志将会发送给/dev/null
logfile stdout# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
# syslog-enabled no# Specify the syslog identity.
# syslog-ident redis# Specify the syslog facility.  Must be USER or between LOCAL0-LOCAL7.
# syslog-facility local0# 设置数据库的数量,默认数据库为0,可以使用select <dbid>命令在连接上指定数据库id
# dbid是从0到‘databases’-1的数目
databases 16################################ SNAPSHOTTING  #################################
# 指定在多长时间内,有多少次更新操作,就将数据同步到数据文件,可以多个条件配合
# Save the DB on disk:
#
#   save <seconds> <changes>
#
#   Will save the DB if both the given number of seconds and the given
#   number of write operations against the DB occurred.
#
#   满足以下条件将会同步数据:
#   900秒(15分钟)内有1个更改
#   300秒(5分钟)内有10个更改
#   60秒内有10000个更改
#   Note: 可以把所有“save”行注释掉,这样就取消同步操作了save 900 1
save 300 10
save 60 10000# 指定存储至本地数据库时是否压缩数据,默认为yes,Redis采用LZF压缩,如果为了节省CPU时间,可以关闭该选项,但会导致数据库文件变的巨大
rdbcompression yes# 指定本地数据库文件名,默认值为dump.rdb
dbfilename dump.rdb# 工作目录.
# 指定本地数据库存放目录,文件名由上一个dbfilename配置项指定
# 
# Also the Append Only File will be created inside this directory.
# 
# 注意,这里只能指定一个目录,不能指定文件名
dir ./################################# REPLICATION ################################## 主从复制。使用slaveof从 Redis服务器复制一个Redis实例。注意,该配置仅限于当前slave有效
# so for example it is possible to configure the slave to save the DB with a
# different interval, or to listen to another port, and so on.
# 设置当本机为slav服务时,设置master服务的ip地址及端口,在Redis启动时,它会自动从master进行数据同步
# slaveof <masterip> <masterport># 当master服务设置了密码保护时,slave服务连接master的密码
# 下文的“requirepass”配置项可以指定密码
# masterauth <master-password># When a slave lost the connection with the master, or when the replication
# is still in progress, the slave can act in two different ways:
#
# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
#    still reply to client requests, possibly with out of data data, or the
#    data set may just be empty if this is the first synchronization.
#
# 2) if slave-serve-stale data is set to 'no' the slave will reply with
#    an error "SYNC with master in progress" to all the kind of commands
#    but to INFO and SLAVEOF.
#
slave-serve-stale-data yes# Slaves send PINGs to server in a predefined interval. It's possible to change
# this interval with the repl_ping_slave_period option. The default value is 10
# seconds.
#
# repl-ping-slave-period 10# The following option sets a timeout for both Bulk transfer I/O timeout and
# master data or ping response timeout. The default value is 60 seconds.
#
# It is important to make sure that this value is greater than the value
# specified for repl-ping-slave-period otherwise a timeout will be detected
# every time there is low traffic between the master and the slave.
#
# repl-timeout 60################################## SECURITY #################################### Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
# 设置Redis连接密码,如果配置了连接密码,客户端在连接Redis时需要通过auth <password>命令提供密码,默认关闭
requirepass changeme# Command renaming.
#
# It is possilbe to change the name of dangerous commands in a shared
# environment. For instance the CONFIG command may be renamed into something
# of hard to guess so that it will be still available for internal-use
# tools but not available for general clients.
#
# Example:
#
# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
#
# It is also possilbe to completely kill a command renaming it into
# an empty string:
#
# rename-command CONFIG ""################################### LIMITS ##################################### 设置同一时间最大客户端连接数,默认无限制,Redis可以同时打开的客户端连接数为Redis进程可以打开的最大文件描述符数,
# 如果设置maxclients 0,表示不作限制。当客户端连接数到达限制时,Redis会关闭新的连接并向客户端返回max Number of clients reached错误信息
# maxclients 128# Don't use more memory than the specified amount of bytes.
# When the memory limit is reached Redis will try to remove keys with an
# EXPIRE set. It will try to start freeing keys that are going to expire
# in little time and preserve keys with a longer time to live.
# Redis will also try to remove objects from free lists if possible.
#
# If all this fails, Redis will start to reply with errors to commands
# that will use more memory, like SET, LPUSH, and so on, and will continue
# to reply to most read-only commands like GET.
#
# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
# 'state' server or cache, not as a real DB. When Redis is used as a real
# database the memory usage will grow over the weeks, it will be obvious if
# it is going to use too much memory in the long run, and you'll have the time
# to upgrade. With maxmemory after the limit is reached you'll start to get
# errors for write operations, and this may even lead to DB inconsistency.
# 指定Redis最大内存限制,Redis在启动时会把数据加载到内存中,达到最大内存后,Redis会先尝试清除已到期或即将到期的Key,
# 当此方法处理后,仍然到达最大内存设置,将无法再进行写入操作,但仍然可以进行读取操作。
# Redis新的vm机制,会把Key存放内存,Value会存放在swap区
# maxmemory <bytes># MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# is reached? You can select among five behavior:
# 
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys->random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
# 
# Note: with all the kind of policies, Redis will return an error on write
#       operations, when there are not suitable keys for eviction.
#
#       At the date of writing this commands are: set setnx setex append
#       incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
#       sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
#       zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
#       getset mset msetnx exec sort
#
# The default is:
#
# maxmemory-policy volatile-lru# LRU and minimal TTL algorithms are not precise algorithms but approximated
# algorithms (in order to save memory), so you can select as well the sample
# size to check. For instance for default Redis will check three keys and
# pick the one that was used less recently, you can change the sample size
# using the following configuration directive.
#
# maxmemory-samples 3############################## APPEND ONLY MODE ################################ 
# Note that you can have both the async dumps and the append only file if you
# like (you have to comment the "save" statements above to disable the dumps).
# Still if append only mode is enabled Redis will load the data from the
# log file at startup ignoring the dump.rdb file.
# 指定是否在每次更新操作后进行日志记录,Redis在默认情况下是异步的把数据写入磁盘,如果不开启,可能会在断电时导致一段时间内的数据丢失。
# 因为redis本身同步数据文件是按上面save条件来同步的,所以有的数据会在一段时间内只存在于内存中。默认为no
# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
# log file in background when it gets too big.appendonly no# 指定更新日志文件名,默认为appendonly.aof
# appendfilename appendonly.aof# The fsync() call tells the Operating System to actually write data on disk
# instead to wait for more data in the output buffer. Some OS will really flush 
# data on disk, some other OS will just try to do it ASAP.# 指定更新日志条件,共有3个可选值:
# no:表示等操作系统进行数据缓存同步到磁盘(快)
# always:表示每次更新操作后手动调用fsync()将数据写到磁盘(慢,安全)
# everysec:表示每秒同步一次(折衷,默认值)appendfsync everysec
# appendfsync no# When the AOF fsync policy is set to always or everysec, and a background
# saving process (a background save or AOF log background rewriting) is
# performing a lot of I/O against the disk, in some Linux configurations
# Redis may block too long on the fsync() call. Note that there is no fix for
# this currently, as even performing fsync in a different thread will block
# our synchronous write(2) call.
#
# In order to mitigate this problem it's possible to use the following option
# that will prevent fsync() from being called in the main process while a
# BGSAVE or BGREWRITEAOF is in progress.
#
# This means that while another child is saving the durability of Redis is
# the same as "appendfsync none", that in pratical terms means that it is
# possible to lost up to 30 seconds of log in the worst scenario (with the
# default Linux settings).
# 
# If you have latency problems turn this to "yes". Otherwise leave it as
# "no" that is the safest pick from the point of view of durability.
no-appendfsync-on-rewrite no# Automatic rewrite of the append only file.
# Redis is able to automatically rewrite the log file implicitly calling
# BGREWRITEAOF when the AOF log size will growth by the specified percentage.
# 
# This is how it works: Redis remembers the size of the AOF file after the
# latest rewrite (or if no rewrite happened since the restart, the size of
# the AOF at startup is used).
#
# This base size is compared to the current size. If the current size is
# bigger than the specified percentage, the rewrite is triggered. Also
# you need to specify a minimal size for the AOF file to be rewritten, this
# is useful to avoid rewriting the AOF file even if the percentage increase
# is reached but it is still pretty small.
#
# Specify a precentage of zero in order to disable the automatic AOF
# rewrite feature.auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb################################## SLOW LOG #################################### The Redis Slow Log is a system to log queries that exceeded a specified
# execution time. The execution time does not include the I/O operations
# like talking with the client, sending the reply and so forth,
# but just the time needed to actually execute the command (this is the only
# stage of command execution where the thread is blocked and can not serve
# other requests in the meantime).
# 
# You can configure the slow log with two parameters: one tells Redis
# what is the execution time, in microseconds, to exceed in order for the
# command to get logged, and the other parameter is the length of the
# slow log. When a new command is logged the oldest one is removed from the
# queue of logged commands.# The following time is expressed in microseconds, so 1000000 is equivalent
# to one second. Note that a negative number disables the slow log, while
# a value of zero forces the logging of every command.
slowlog-log-slower-than 10000# There is no limit to this length. Just be aware that it will consume memory.
# You can reclaim memory used by the slow log with SLOWLOG RESET.
slowlog-max-len 1024################################ VIRTUAL MEMORY ################################## WARNING! Virtual Memory is deprecated in Redis 2.4
### The use of Virtual Memory is strongly discouraged.### WARNING! Virtual Memory is deprecated in Redis 2.4
### The use of Virtual Memory is strongly discouraged.# Virtual Memory allows Redis to work with datasets bigger than the actual
# amount of RAM needed to hold the whole dataset in memory.
# In order to do so very used keys are taken in memory while the other keys
# are swapped into a swap file, similarly to what operating systems do
# with memory pages.
# 指定是否启用虚拟内存机制,默认值为no,
# VM机制将数据分页存放,由Redis将访问量较少的页即冷数据swap到磁盘上,访问多的页面由磁盘自动换出到内存中
# 把vm-enabled设置为yes,根据需要设置好接下来的三个VM参数,就可以启动VM了
vm-enabled no
# vm-enabled yes# This is the path of the Redis swap file. As you can guess, swap files
# can't be shared by different Redis instances, so make sure to use a swap
# file for every redis process you are running. Redis will complain if the
# swap file is already in use.
#
# Redis交换文件最好的存储是SSD(固态硬盘)
# 虚拟内存文件路径,默认值为/tmp/redis.swap,不可多个Redis实例共享
# *** WARNING *** if you are using a shared hosting the default of putting
# the swap file under /tmp is not secure. Create a dir with access granted
# only to Redis user and configure Redis to create the swap file there.
vm-swap-file /tmp/redis.swap# With vm-max-memory 0 the system will swap everything it can. Not a good
# default, just specify the max amount of RAM you can in bytes, but it's
# better to leave some margin. For instance specify an amount of RAM
# that's more or less between 60 and 80% of your free RAM.
# 将所有大于vm-max-memory的数据存入虚拟内存,无论vm-max-memory设置多少,所有索引数据都是内存存储的(Redis的索引数据就是keys)
# 也就是说当vm-max-memory设置为0的时候,其实是所有value都存在于磁盘。默认值为0
vm-max-memory 0# Redis swap文件分成了很多的page,一个对象可以保存在多个page上面,但一个page上不能被多个对象共享,vm-page-size是要根据存储的数据大小来设定的。
# 建议如果存储很多小对象,page大小最后设置为32或64bytes;如果存储很大的对象,则可以使用更大的page,如果不确定,就使用默认值
vm-page-size 32# 设置swap文件中的page数量由于页表(一种表示页面空闲或使用的bitmap)是存放在内存中的,在磁盘上每8个pages将消耗1byte的内存
# swap空间总容量为 vm-page-size * vm-pages
#
# With the default of 32-bytes memory pages and 134217728 pages Redis will
# use a 4 GB swap file, that will use 16 MB of RAM for the page table.
#
# It's better to use the smallest acceptable value for your application,
# but the default is large in order to work in most conditions.
vm-pages 134217728# Max number of VM I/O threads running at the same time.
# This threads are used to read/write data from/to swap file, since they
# also encode and decode objects from disk to memory or the reverse, a bigger
# number of threads can help with big objects even if they can't help with
# I/O itself as the physical device may not be able to couple with many
# reads/writes operations at the same time.
# 设置访问swap文件的I/O线程数,最后不要超过机器的核数,如果设置为0,那么所有对swap文件的操作都是串行的,可能会造成比较长时间的延迟,默认值为4
vm-max-threads 4############################### ADVANCED CONFIG ################################ Hashes are encoded in a special way (much more memory efficient) when they
# have at max a given numer of elements, and the biggest element does not
# exceed a given threshold. You can configure this limits with the following
# configuration directives.
# 指定在超过一定的数量或者最大的元素超过某一临界值时,采用一种特殊的哈希算法
hash-max-zipmap-entries 512
hash-max-zipmap-value 64# Similarly to hashes, small lists are also encoded in a special way in order
# to save a lot of space. The special representation is only used when
# you are under the following limits:
list-max-ziplist-entries 512
list-max-ziplist-value 64# Sets have a special encoding in just one case: when a set is composed
# of just strings that happens to be integers in radix 10 in the range
# of 64 bit signed integers.
# The following configuration setting sets the limit in the size of the
# set in order to use this special memory saving encoding.
set-max-intset-entries 512# Similarly to hashes and lists, sorted sets are also specially encoded in
# order to save a lot of space. This encoding is only used when the length and
# elements of a sorted set are below the following limits:
zset-max-ziplist-entries 128
zset-max-ziplist-value 64# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation redis uses (see dict.c)
# performs a lazy rehashing: the more operation you run into an hash table
# that is rhashing, the more rehashing "steps" are performed, so if the
# server is idle the rehashing is never complete and some more memory is used
# by the hash table.
# 
# The default is to use this millisecond 10 times every second in order to
# active rehashing the main dictionaries, freeing memory when possible.
#
# If unsure:
# use "activerehashing no" if you have hard latency requirements and it is
# not a good thing in your environment that Redis can reply form time to time
# to queries with 2 milliseconds delay.
# 指定是否激活重置哈希,默认为开启
activerehashing yes################################## INCLUDES #################################### 指定包含其他的配置文件,可以在同一主机上多个Redis实例之间使用同一份配置文件,而同时各实例又拥有自己的特定配置文件
# include /path/to/local.conf
# include /path/to/other.conf

创建新镜像

通过Dockerfile脚本基于保存的镜像创建镜像。

#创建Dockerfile
$ sudo touch Dockerfile

编辑Dockerfile脚本文件$ sudo vim Dockerfile

FROM redis:3.2.12
COPY redis.conf /usr/local/etc/redis/redis.conf
EXPOSE 6379
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]

构建镜像

$ sudo docker build –t local/myredis:1 .       #最后面还有一个点号

启动实例容器

根据Dockerfile创建的新镜像实例化并运行一个容器。

# 查看镜像,有三个redis镜像了
$ sudo docker images
REPOSITORY            TAG                 IMAGE ID            CREATED              SIZE
local/redis           1                   a4d04ae26d03        About a minute ago   76MB
myredis               1                   c578c13c6627        About an hour ago    76MB
redis                 3.2.12              e2e6164a20de        3 weeks ago          76MB

根据local/redis或者a4d04ae26d03启动运行一个容器

$ sudo docker run --name myredis -p 6379:6379 -d local/redis:1

直接传递配置文件参数启动一个redis实例

$ sudo docker run -v /home/ringyin/redis/redis.conf:/usr/local/etc/redis/redis.conf --name myredis -p 6379:6379 -d redis:3.2.12

连接到redis容器

先查询到myredis容器的ip地址。

$ sudo docker inspect myredis | grep IP 

连接到redis容器。然后就进入redis命令行了。

$ sudo docker run -it redis:3.2.12 redis-cli -h 172.17.0.3 -p 6379 

连接成功后,测试数据

172.17.0.3:6379> set test 123
OK
172.17.0.3:6379> get test
"123"
172.17.0.3:6379> 

进入容器通过redis-cli测试

root@da4599d6202f:/usr/local/bin# redis-cli -p 6379
127.0.0.1:6379> set test 456
OK
127.0.0.1:6379> get test
"456"

r run --name myredis -p 6379:6379 -d local/redis:1

## 直接传递配置文件参数启动一个redis实例```sh
$ sudo docker run -v /home/ringyin/redis/redis.conf:/usr/local/etc/redis/redis.conf --name myredis -p 6379:6379 -d redis:3.2.12

连接到redis容器

先查询到myredis容器的ip地址。

$ sudo docker inspect myredis | grep IP 

连接到redis容器。然后就进入redis命令行了。

$ sudo docker run -it redis:3.2.12 redis-cli -h 172.17.0.3 -p 6379 

连接成功后,测试数据

172.17.0.3:6379> set test 123
OK
172.17.0.3:6379> get test
"123"
172.17.0.3:6379> 

进入容器通过redis-cli测试

root@da4599d6202f:/usr/local/bin# redis-cli -p 6379
127.0.0.1:6379> set test 456
OK
127.0.0.1:6379> get test
"456"
查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 第14章 Docker 中 Zookeeper 的安装与配置

    第14章 Docker 中 zookeeper 的安装与配置 文章目录第14章 Docker 中 zookeeper 的安装与配置前言目标环境概述设计目标(Design Goals)数据模型和分层命名空间(Data model and the hierarchical namespace)节点和短暂节点(Nodes and ephemeral nodes)有条件的更新和监控(…...

    2024/5/1 4:07:07
  2. 第15章 Docker 中 ActiveMQ 的安装与配置

    第15章 Docker 中 ActiveMQ 的安装与配置 文章目录第15章 Docker 中 ActiveMQ 的安装与配置前言目标环境介绍特性(Features)版本硬件要求中央处理器(CPU)内存(Memory)存储(Storage)安装(Installation)快速开始(Quick Start)配置(Configuration)访问普通用户(Reg…...

    2024/4/23 11:13:47
  3. 第16章 Docker 中 RabbiteMQ 的安装与配置及使用

    第16章 Docker 中 RabbiteMQ 的安装与配置及使用 文章目录第16章 Docker 中 RabbiteMQ 的安装与配置及使用前言目标环境介绍快速参考(Quick reference)什么是RabbitMQ?如何使用此镜像运行守护进程(Running the daemon)内存限制(Memory Limits)Erlang CookieManagement P…...

    2024/4/29 9:42:30
  4. Qt学习笔记

    学习资源:Qt版本:5.9.2视频资源:https://www.bilibili.com/video/BV1XW411x7NU?from=search&seid=3132319167432312960学习内容:至本博客完成,学至核心控件与浮动窗口。学习代码示例:#include<QApplication> #include<QWidget> #include<QPushButton…...

    2024/4/21 3:44:54
  5. 第17章 Docker 中 MongoDB 的安装与配置及使用

    第17章 Docker 中 MongoDB 的安装与配置及使用2018-10-14文章目录第17章 Docker 中 MongoDB 的安装与配置及使用前言目标环境介绍快速参考(Quick reference)什么是MongoDB?如何使用此镜像启动mongo服务器实例从另一个Docker容器连接到MongoDB...通过docker stack deploy或do…...

    2024/3/24 8:30:39
  6. maven 多模块打包记

    背景 九月初,炎夏褪去,秋微凉。最近,不知从哪一天开始,早上 5 点钟起床时,天还没亮;晚上不到 7 点,天已黑;四季的车轮,就在人无所察觉时轰隆而过! 言归正传,今天介绍一下 maven 多模块打包过程中蹚过的点,昨天整整耗费一整天的时间,玩了一个 mvn -X clean install…...

    2024/4/18 22:33:24
  7. 外包公司派遣到网易,上班地点网易大厦,转正后工资8k-10k,13薪,包三餐,值得去吗?

    请肆无忌惮地点赞吧,微信搜索【沉默王二】关注这个在九朝古都洛阳苟且偷生的程序员。 本文 GitHub github.com/itwanger 已收录,里面还有我精心为你准备的一线大厂面试题。题目很长,但映入眼帘的,只有两个字——不是“网易”,是“外包”了。 很想来谈谈这个话题,因为我已…...

    2024/4/19 1:52:05
  8. 【Flutter 实战】各种各样形状的组件

    老孟导读:Flutter中很多组件都有一个叫做shape的属性,类型是ShapeBorder,比如Button类、Card等组件,shape表示控件的形状,系统已经为我们提供了很多形状,对于没有此属性的组件,可以使用 Clip 类组件进行裁减。BeveledRectangleBorder 斜角矩形边框,用法如下: RaisedBu…...

    2024/4/13 9:42:24
  9. Spring Boot + Activiti 在浏览器显示工作流图

    本篇承接上一篇: Spring Boot + Activiti 工作流框架搭建 Activiti 版本是:7.1.0.M6 总概 在Activiti 7 版本中,导出流程图的功能独立成一个独立的依赖包, 默认的导出格式是SVG的图片。所以,导出流程图的功能开发主要是3步:导入图片导出的依赖包 定义导出图片需要的Bean…...

    2024/3/15 12:06:45
  10. Java多线程 多个人转账发生死锁

    文章目录多个人转账发生死锁 多个人转账发生死锁 人数多的时候, 依然会发生死锁, 遵循墨菲定律. 虽然人多的时候发生死锁的几率不高, 但是危害大. 此节的代码中, 需要用到上一节的代码, 链接如下. https://javaweixin6.blog.csdn.net/article/details/108475207 此节的代码如下…...

    2024/4/19 4:05:06
  11. 这些 ECMAScript 模块知识,都是我需要知道的

    作者:Valentino Gagliardi 译者:前端小智 来源:valentinog点赞再看,微信搜索 【大迁世界】 关注这个没有大厂背景,但有着一股向上积极心态人。本文 GitHub https://github.com/qq449245884/xiaozhi 上已经收录,文章的已分类,也整理了很多我的文档,和教程资料。ES 模块是…...

    2024/4/22 12:52:26
  12. 为什么 char 数组比 String 更适合存储密码?

    推荐阅读:5 个刁钻的 String 面试题! 另一个基于 String 的棘手 Java 问题,相信我只有很少的 Java 程序员可以正确回答这个问题。 这是一个真正艰难的核心 Java 面试问题,并且需要对 String 的扎实知识才能回答这个问题。 这是最近在 Java 面试中向我的一位朋友询问的问题。…...

    2024/4/18 20:32:02
  13. 解决微信H5获取SDK授权报错提示errMsg: “config:fail,Error: 系统错误,错误码:63002,invalid signature [20200908 22:17:17][]“

    如果常规检查都做过可以仔细看下https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Global_Return_Code.html这个里面的报错原因如果都不是那么极有可能是(看样子你的H5页面日活人数还蛮多[呲牙])获取腾讯微信平台access_token超过每日默认上限2000次导致无…...

    2024/4/30 0:25:12
  14. 生活随记 - 食堂偶遇的两个小伙伴

    去楼下中餐馆吃饭,那了餐具打好饭,餐厅生意挺好,没有单独的空餐桌了,看到一个圆桌上有2个空位,我就坐下了,同桌的是2个小伙子(暂时称呼为a和b),穿找外卖套装,估计是中午休息时间赶着吃点饭。有一个小伙子a吃饭间隙打开手机,鼠标点点,似乎在忙着什么。小伙b看到了,…...

    2024/4/19 0:57:34
  15. 【Spring】IOC容器注解汇总,你想要的都在这儿了!!

    写在前面之前,我们在【Spring】专题中更新了不少关于Spring注解相关的文章,有些小伙伴反馈说,看历史文章的话比较零散,经常会忘记自己看到哪一篇了。当打开一篇新文章时,总感觉自己似乎是看到过了,又感觉自己没有看到过。那怎么办呢?为了小伙伴们查看方便,我在这里将Sp…...

    2024/4/18 20:27:54
  16. windows系统中创建虚拟环境

    文章目录1. 前言2. 说明3. 虚拟磁盘创建3.1 创建windows(VHD)虚拟磁盘3.2 虚拟磁盘加密4、温馨一刻 1. 前言 最近时不时就换电脑搞事情,反复的配环境,引用我老师说JJK的话“你这太让人恼火了”,哈哈。虽然机智的我知道后面存在换主机为一个确定事件,所以一开始就把各种需求…...

    2024/3/15 12:06:38
  17. 学习笔记 - 关于postgres软解析

    周末在家趁孩子睡午觉,学习一会postgres,这个号称可以取代oracle数据库的开源数据库,一直以来关注着。oracle工作学习中让人印象深刻和比较难以琢磨领悟的就是软解析和硬解析。那么postgres里面这块是怎么样的呢?和oracle又有哪些区别呢?其中最大的区别就是oracle里面有sg…...

    2024/4/19 9:50:21
  18. 思科路由器

    路由器设备IOS备份:备份步骤:1. 确保tftp服务器和路由器在同一个LAN中2. 思科拓扑:3. 路由器备份配置命令:R1#show flash: System flash directory: File Length Name/status3 50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin2 28282 sigdef-category.xml1 …...

    2024/4/17 2:17:56
  19. Selection Ratio:帮你解决头疼的遗漏变量偏误

    原文链接: https://www.lianxh.cn/news/520d9c77b7b43.html 👈🍎 连享会   推文 || 视频 扫码查看最新推文和分享温馨提示: 定期 清理浏览器缓存,可以获得最佳浏览体验。作者: 郭楚玉 (武汉大学) 邮箱: julieguo@whu.edu.cn目录理论背景 Selection ratio 的基本原…...

    2024/4/25 13:57:22
  20. 手牵手学习webpack之基础知识

    概念本质上,webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler)。当 webpack 处理应用程序时,它会递归地构建一个依赖关系图(dependency graph),其中包含应用程序需要的每个模块,然后将所有这些模块打包成一个或多个 bundle。本地安装要安装最新版本…...

    2024/4/18 17:52:31

最新文章

  1. 与Apollo共创生态:探索自动驾驶的未来蓝图

    目录 引言Apollo开放平台Apollo开放平台企业生态计划Apollo X 企业自动驾驶解决方案&#xff1a;加速企业场景应用落地Apollo开放平台携手伙伴共创生态生态共创会员权益 个人心得与展望技术的多元化应用数据驱动的智能化安全与可靠性的重视 结语 引言 就在2024年4月19日&#x…...

    2024/5/2 11:18:11
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. 磁盘管理与文件管理

    文章目录 一、磁盘结构二、MBR与磁盘分区分区的优势与缺点分区的方式文件系统分区工具挂载与解挂载 一、磁盘结构 1.硬盘结构 硬盘分类&#xff1a; 1.机械硬盘&#xff1a;靠磁头转动找数据 慢 便宜 2.固态硬盘&#xff1a;靠芯片去找数据 快 贵 硬盘的数据结构&#xff1a;…...

    2024/5/1 13:00:58
  4. 24 个Intellij IDEA好用插件

    24 个Intellij IDEA好用插件 一. 安装插件 Codota 代码智能提示插件 只要打出首字母就能联想出一整条语句&#xff0c;这也太智能了&#xff0c;还显示了每条语句使用频率。 原因是它学习了我的项目代码&#xff0c;总结出了我的代码偏好。 Key Promoter X 快捷键提示插件 …...

    2024/5/1 14:08:40
  5. 416. 分割等和子集问题(动态规划)

    题目 题解 class Solution:def canPartition(self, nums: List[int]) -> bool:# badcaseif not nums:return True# 不能被2整除if sum(nums) % 2 ! 0:return False# 状态定义&#xff1a;dp[i][j]表示当背包容量为j&#xff0c;用前i个物品是否正好可以将背包填满&#xff…...

    2024/5/2 11:19:01
  6. 【Java】ExcelWriter自适应宽度工具类(支持中文)

    工具类 import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;/*** Excel工具类** author xiaoming* date 2023/11/17 10:40*/ public class ExcelUti…...

    2024/5/1 13:20:04
  7. Spring cloud负载均衡@LoadBalanced LoadBalancerClient

    LoadBalance vs Ribbon 由于Spring cloud2020之后移除了Ribbon&#xff0c;直接使用Spring Cloud LoadBalancer作为客户端负载均衡组件&#xff0c;我们讨论Spring负载均衡以Spring Cloud2020之后版本为主&#xff0c;学习Spring Cloud LoadBalance&#xff0c;暂不讨论Ribbon…...

    2024/5/1 21:18:12
  8. TSINGSEE青犀AI智能分析+视频监控工业园区周界安全防范方案

    一、背景需求分析 在工业产业园、化工园或生产制造园区中&#xff0c;周界防范意义重大&#xff0c;对园区的安全起到重要的作用。常规的安防方式是采用人员巡查&#xff0c;人力投入成本大而且效率低。周界一旦被破坏或入侵&#xff0c;会影响园区人员和资产安全&#xff0c;…...

    2024/5/2 9:47:31
  9. VB.net WebBrowser网页元素抓取分析方法

    在用WebBrowser编程实现网页操作自动化时&#xff0c;常要分析网页Html&#xff0c;例如网页在加载数据时&#xff0c;常会显示“系统处理中&#xff0c;请稍候..”&#xff0c;我们需要在数据加载完成后才能继续下一步操作&#xff0c;如何抓取这个信息的网页html元素变化&…...

    2024/5/2 9:47:31
  10. 【Objective-C】Objective-C汇总

    方法定义 参考&#xff1a;https://www.yiibai.com/objective_c/objective_c_functions.html Objective-C编程语言中方法定义的一般形式如下 - (return_type) method_name:( argumentType1 )argumentName1 joiningArgument2:( argumentType2 )argumentName2 ... joiningArgu…...

    2024/5/2 6:03:07
  11. 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】

    &#x1f468;‍&#x1f4bb;博客主页&#xff1a;花无缺 欢迎 点赞&#x1f44d; 收藏⭐ 留言&#x1f4dd; 加关注✅! 本文由 花无缺 原创 收录于专栏 【洛谷算法题】 文章目录 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】&#x1f30f;题目描述&#x1f30f;输入格…...

    2024/5/2 9:47:30
  12. 【ES6.0】- 扩展运算符(...)

    【ES6.0】- 扩展运算符... 文章目录 【ES6.0】- 扩展运算符...一、概述二、拷贝数组对象三、合并操作四、参数传递五、数组去重六、字符串转字符数组七、NodeList转数组八、解构变量九、打印日志十、总结 一、概述 **扩展运算符(...)**允许一个表达式在期望多个参数&#xff0…...

    2024/5/1 11:24:00
  13. 摩根看好的前智能硬件头部品牌双11交易数据极度异常!——是模式创新还是饮鸩止渴?

    文 | 螳螂观察 作者 | 李燃 双11狂欢已落下帷幕&#xff0c;各大品牌纷纷晒出优异的成绩单&#xff0c;摩根士丹利投资的智能硬件头部品牌凯迪仕也不例外。然而有爆料称&#xff0c;在自媒体平台发布霸榜各大榜单喜讯的凯迪仕智能锁&#xff0c;多个平台数据都表现出极度异常…...

    2024/5/2 5:31:39
  14. Go语言常用命令详解(二)

    文章目录 前言常用命令go bug示例参数说明 go doc示例参数说明 go env示例 go fix示例 go fmt示例 go generate示例 总结写在最后 前言 接着上一篇继续介绍Go语言的常用命令 常用命令 以下是一些常用的Go命令&#xff0c;这些命令可以帮助您在Go开发中进行编译、测试、运行和…...

    2024/5/1 20:22:59
  15. 用欧拉路径判断图同构推出reverse合法性:1116T4

    http://cplusoj.com/d/senior/p/SS231116D 假设我们要把 a a a 变成 b b b&#xff0c;我们在 a i a_i ai​ 和 a i 1 a_{i1} ai1​ 之间连边&#xff0c; b b b 同理&#xff0c;则 a a a 能变成 b b b 的充要条件是两图 A , B A,B A,B 同构。 必要性显然&#xff0…...

    2024/5/2 9:47:28
  16. 【NGINX--1】基础知识

    1、在 Debian/Ubuntu 上安装 NGINX 在 Debian 或 Ubuntu 机器上安装 NGINX 开源版。 更新已配置源的软件包信息&#xff0c;并安装一些有助于配置官方 NGINX 软件包仓库的软件包&#xff1a; apt-get update apt install -y curl gnupg2 ca-certificates lsb-release debian-…...

    2024/5/2 9:47:27
  17. Hive默认分割符、存储格式与数据压缩

    目录 1、Hive默认分割符2、Hive存储格式3、Hive数据压缩 1、Hive默认分割符 Hive创建表时指定的行受限&#xff08;ROW FORMAT&#xff09;配置标准HQL为&#xff1a; ... ROW FORMAT DELIMITED FIELDS TERMINATED BY \u0001 COLLECTION ITEMS TERMINATED BY , MAP KEYS TERMI…...

    2024/5/2 0:07:22
  18. 【论文阅读】MAG:一种用于航天器遥测数据中有效异常检测的新方法

    文章目录 摘要1 引言2 问题描述3 拟议框架4 所提出方法的细节A.数据预处理B.变量相关分析C.MAG模型D.异常分数 5 实验A.数据集和性能指标B.实验设置与平台C.结果和比较 6 结论 摘要 异常检测是保证航天器稳定性的关键。在航天器运行过程中&#xff0c;传感器和控制器产生大量周…...

    2024/5/2 8:37:00
  19. --max-old-space-size=8192报错

    vue项目运行时&#xff0c;如果经常运行慢&#xff0c;崩溃停止服务&#xff0c;报如下错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 因为在 Node 中&#xff0c;通过JavaScript使用内存时只能使用部分内存&#xff08;64位系统&…...

    2024/5/2 9:47:26
  20. 基于深度学习的恶意软件检测

    恶意软件是指恶意软件犯罪者用来感染个人计算机或整个组织的网络的软件。 它利用目标系统漏洞&#xff0c;例如可以被劫持的合法软件&#xff08;例如浏览器或 Web 应用程序插件&#xff09;中的错误。 恶意软件渗透可能会造成灾难性的后果&#xff0c;包括数据被盗、勒索或网…...

    2024/5/2 9:47:25
  21. JS原型对象prototype

    让我简单的为大家介绍一下原型对象prototype吧&#xff01; 使用原型实现方法共享 1.构造函数通过原型分配的函数是所有对象所 共享的。 2.JavaScript 规定&#xff0c;每一个构造函数都有一个 prototype 属性&#xff0c;指向另一个对象&#xff0c;所以我们也称为原型对象…...

    2024/5/1 14:33:22
  22. C++中只能有一个实例的单例类

    C中只能有一个实例的单例类 前面讨论的 President 类很不错&#xff0c;但存在一个缺陷&#xff1a;无法禁止通过实例化多个对象来创建多名总统&#xff1a; President One, Two, Three; 由于复制构造函数是私有的&#xff0c;其中每个对象都是不可复制的&#xff0c;但您的目…...

    2024/5/1 11:51:23
  23. python django 小程序图书借阅源码

    开发工具&#xff1a; PyCharm&#xff0c;mysql5.7&#xff0c;微信开发者工具 技术说明&#xff1a; python django html 小程序 功能介绍&#xff1a; 用户端&#xff1a; 登录注册&#xff08;含授权登录&#xff09; 首页显示搜索图书&#xff0c;轮播图&#xff0…...

    2024/5/2 7:30:11
  24. 电子学会C/C++编程等级考试2022年03月(一级)真题解析

    C/C++等级考试(1~8级)全部真题・点这里 第1题:双精度浮点数的输入输出 输入一个双精度浮点数,保留8位小数,输出这个浮点数。 时间限制:1000 内存限制:65536输入 只有一行,一个双精度浮点数。输出 一行,保留8位小数的浮点数。样例输入 3.1415926535798932样例输出 3.1…...

    2024/5/1 20:56:20
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57