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