docker中配置(安装启动)Redis

在docker中配置(安装启动)Redis

yum install docker

docker中配置(安装启动)Redis

systemctl start docker
docekr version

docker中配置(安装启动)Redis

docker search redis
docker pull docker.io/redis
docker image ls
docker run -itd -name=myredis -p 6379:6379
docker ps
docker ps -a
docker exec -i -t myredis /bin/bash

docker中配置(安装启动)Redis
docker中配置(安装启动)Redis

docker start myredis

redis常见类型

a) string

  1. set key value
  2. get key value

b) list

docker中配置(安装启动)Redis

c) hash:map

docker中配置(安装启动)Redis

d) set

docker中配置(安装启动)Redis
docker中配置(安装启动)Redis

e) sorted set

docker中配置(安装启动)Redis
Map<key,value>
rename key newkey

expire fruit 过期的时间[s]

上一篇:c++ centos redis 通讯demo 封装


下一篇:Docker 安装Redis容器