2014-09-20 21:50:27 +08:00
|
|
|
|
## CentOS系列安装docker
|
2014-09-05 15:49:58 +08:00
|
|
|
|
|
2014-09-20 21:50:27 +08:00
|
|
|
|
Docker支持CentOS6及以后的版本。
|
2014-09-11 22:52:28 +08:00
|
|
|
|
|
2014-09-20 21:50:27 +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
|
|
|
|
|
|
|
|
|
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-09-20 21:50:27 +08:00
|
|
|
|
安装之后启动Docker服务,并让它随系统启动自动启动。
|
2014-09-05 15:49:58 +08:00
|
|
|
|
```
|
|
|
|
|
$ service docker start
|
|
|
|
|
$ chkconfig docker on
|
2014-09-12 15:37:21 +08:00
|
|
|
|
```
|