su root # 先切换到root用户, 再执行以下命令systemctl enable docker # 开机自动启动docker
systemctl start docker # 启动dockersystemctl restart docker # 重启dokcer