1.安装docker
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-enginesudo yum install -y yum-utils
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
2.安装redis
docker pull redis<br>docker run -itd --name redis-test -p 6379:6379 redis --requirepass 1qaz9ol.
以上是centos怎么以docker方式安装redis的详细内容。更多信息请关注PHP中文网其他相关文章!