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.
The above is the detailed content of How to install redis in docker mode on centos. For more information, please follow other related articles on the PHP Chinese website!