su root # 先切換到root用戶, 再執(zhí)行以下命令systemctl enable docker # 開機自動啟動docker
systemctl start docker # 啟動dockersystemctl restart docker # 重啟dokcer