2014-09-20 13:50:27 +00:00
|
|
|
|
## CentOS系列安装docker
|
2014-09-05 07:49:58 +00:00
|
|
|
|
|
2014-09-20 13:50:27 +00:00
|
|
|
|
Docker支持CentOS6及以后的版本。
|
2014-09-11 14:52:28 +00:00
|
|
|
|
|
2014-09-20 13:50:27 +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
|
|
|
|
|
|
|
|
|
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-09-23 05:45:50 +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
|
|
|
|
```
|