因为平常使用的都是centos7系统,所以只记录centos7系统下docker的安装启动,其它系统之后再更新吧。
安装
直接使用yum安装即可。
$ sudo yum install docker -y
之后设置开机自启动并启动服务
[vitue@realtiger ~]$ systemctl enable docker
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: vitue
Password:
==== AUTHENTICATION COMPLETE ===
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: vitue
Password:
==== AUTHENTICATION COMPLETE ===
[vitue@realtiger ~]$ systemctl restart docker
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: vitue
Password:
==== AUTHENTICATION COMPLETE ===
[vitue@realtiger ~]$
网友评论