2014-10-14 13:25:01 +08:00
|
|
|
|
## CentOS 系列安装 Docker
|
2014-09-05 15:49:58 +08:00
|
|
|
|
|
2014-10-14 13:25:01 +08:00
|
|
|
|
Docker 支持 CentOS6 及以后的版本。
|
2014-09-11 22:52:28 +08:00
|
|
|
|
|
2014-09-26 14:14:13 +08:00
|
|
|
|
### CentOS6
|
2014-10-14 13:25:01 +08:00
|
|
|
|
对于 CentOS6,可以使用 [EPEL](https://fedoraproject.org/wiki/EPEL) 库安装 Docker,命令如下
|
2014-09-11 22:52:28 +08:00
|
|
|
|
```
|
2014-09-20 21:50:27 +08:00
|
|
|
|
$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
|
|
|
|
|
$ sudo yum install docker-io
|
2014-09-11 22:52:28 +08:00
|
|
|
|
```
|
2014-09-20 21:50:27 +08:00
|
|
|
|
|
2014-09-26 14:14:13 +08:00
|
|
|
|
### CentOS7
|
2014-10-14 13:25:01 +08:00
|
|
|
|
CentOS7 系统 `CentOS-Extras` 库中已带 Docker,可以直接安装:
|
2014-09-11 22:52:28 +08:00
|
|
|
|
```
|
2014-09-20 21:50:27 +08:00
|
|
|
|
$ sudo yum install docker
|
2014-09-11 22:52:28 +08:00
|
|
|
|
```
|
|
|
|
|
|
2014-10-14 13:25:01 +08:00
|
|
|
|
安装之后启动 Docker 服务,并让它随系统启动自动加载。
|
2014-09-05 15:49:58 +08:00
|
|
|
|
```
|
2014-09-23 13:45:50 +08:00
|
|
|
|
$ sudo service docker start
|
|
|
|
|
$ sudo chkconfig docker on
|
2014-09-12 15:37:21 +08:00
|
|
|
|
```
|