一、安装docker
1.准备安装环境:
yum install -y yum-utils
2.设置镜像仓库为阿里云:
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3.更新系统yum软件索引:
yum clean all
yum makecache
4.安装docker:
yum install docker-ce docker-ce-cli containerd.io
podman buildah错误:
错误处理:
#卸装podman指令,再安装docker(执行4)
yum erase podman buildah
5.启动docker:
systemctl start docker
6.自启动:
systemctl enable docker
二、安装redis
1.下载镜像
docker pull redis
2.查看下载
docker images
3.普通启动
docker run -p 6379:6379 -d redis:latest redis-server
----------------------------------------------------------------------------------------------------------------------------------
如果服务器重启之后,启动redis
1.docker ps -a
2.docker start d8c1 (d8c1为docker ps -a 的CONTAINER ID前四位)
---------------------------------------------------------------------------------------------------------------------------
redis修改密码:
1. docker exec -it d8c1 redis-cli //进入容器
2. config set requirepass 密码 //设置密码
3. auth 密码 //登录
4. config get requirepass
标签:安装,redis,ce,yum,docker,config From: https://blog.51cto.com/u_16087786/8489377