部署单机版Redis
docker-compose.yml:
version: '2'
services:
#redis容器
redis:
#定义主机名
container_name: redis-single
#使用的镜像
image: redis
#容器的映射端口
ports:
- 6379:6379
command: redis-server /etc/conf/redis.conf
#定义挂载点
volumes:
- ./data:/data
- ./conf:/etc/conf
#环境变量
privileged: true
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
.conf/redis.conf:
bind 0.0.0.0
protected-mode no
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
rdb-del-sync-files no
dir ./
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes
部署单机版Redis的更多相关文章
- Docker 也是本地开发的一神器:部署单机版 Pulsar 和集群架构 Redis
原文链接:Docker 也是本地开发的一神器:部署单机版 Pulsar 和集群架构 Redis 一.前言: 现在互联网的技术架构中,不断出现各种各样的中间件,例如 MQ.Redis.Zookeeper ...
- 7. 单机版Redis的安装以及Redis生产环境启动方案
安装单机版redis redis的生产环境启动方案redis cli的使用 1. 安装单机版redis 大家可以自己去官网下载,当然也可以用课程提供的压缩包 wget http://downloads ...
- [原创]ubuntu14.04部署ELK+redis日志分析系统
ubuntu14.04部署ELK+redis日志分析系统 [环境] host1:172.17.0.4 搭建ELK+redis服务 host2:172.17.0.3 搭建logstash+nginx服务 ...
- Centos7上安装单机版redis
Centos 7 上安装单机版redis Redis 官网下载 https://redis.io/download 1. 下载.解压.安装 cd /usr/local #wget http://dow ...
- 在windows上部署使用redis出现的问题及解决方法
在windows上部署使用Redis出现问题的解决方法 原文链接:https://www.cnblogs.com/herry52/p/5938902.html 下载Redis 在Redis的官网下载 ...
- 在windows上部署使用Redis出现问题的解决方法
下载Redis 在Redis的官网下载页上有各种各样的版本,我这次是在windows上部署的,要去GitHub上下载.目前的是2.8.12版的,直接解压,在\bin\release 目录下有个压缩包, ...
- 使用Docker 一键部署 LNMP+Redis 环境
使用Docker 部署 LNMP+Redis 环境 Docker 简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linu ...
- 【转载】在windows上部署使用Redis
下载Redis 在Redis的官网下载页上有各种各样的版本,我这次是在windows上部署的,要去GitHub上下载.目前的是2.8.12版的,直接解压,在\bin\release 目录下有个压缩包, ...
- 三十九.NoSQL概述 部署Redis服务 、 部署LNMP+Redis
1. 搭建Redis服务器 在主机 192.168.4.50 上安装并启用 redis 服务 设置变量test,值为123 查看变量test的值 1.1 搭建redis服务器 1.1.1 安装re ...
- Dcoker 部署Tomcat+redis+war
1.首先安装redis docker run –name my-redis -d redis 2.安装tomcat并启动 docker run -p 8383:8383 –name tomcat -v ...
随机推荐
- HIVE- 删除功能
删除分区: ALTER TABLE table_name DROP PARTITION (partition_name='20220101');
- sync.Once
保证在 Go 程序运行期间的某段代码只会执行一次 func main() { o := &sync.Once{} for i := 0; i < 10; i++ { o.Do(func( ...
- ES 基础操作
集群 健康值的三种状态 Green:所有索引的所有分片均可用 primary 和 replice 均可用. Yellow 至少有一个 replice不可以用, 但是所有的 primary 正常. Re ...
- [转]C#中的自定义事件和EventHandler的使用
自定义事件: 这里主要模拟刷银行卡,手机提示刷卡信息的过程. 声明一个委托类型 public delegate void DelMethod(string bankName,decimal d ...
- 攻防世界-file_include(绕过base64)
有简单过滤防护的文件包含 一.源码分析 易知$filename处可能会存在文件包含漏洞.但注意到include了一个./check.php文件,猜测可能有过滤.先不管,于是直接使用普通payload ...
- Flink Application Development DataStream API Operators Overview-- Flink应用程序开发DataStream API操作符概览
目录 概览 DataStream转换 物理分区 任务链和资源组 翻译原文- Application Development DataStream API Operators 概览 操作符将一个或多个D ...
- String intern的理解
String s1 = "Programming"; s1在栈内存中,Programming在常量池中. String s2 = new String("Progra ...
- java hibernate +mysql demo
origin article:http://www.javatpoint.com/example-to-create-hibernate-application-in-eclipse-ide requ ...
- git常用命令与AndroidStudio常用快捷键
git相关内容: 产生密钥:cd ~/.ssh (C:\Users\账户名称\.ssh)生成密钥:ssh-keygen -t rsa -C "your_email@youremail.com ...
- Ngrinder(性能测试工具)-(一)
一.ngrinder介绍 nGrinder 是基于Grinder开源项目,由NHN公司的开发团队进行了重新设计和完善. nGrinder 是一款非常易用,有简洁友好的用户界面 和 controller ...