2014-09-12 07:37:21 +00:00
|
|
|
|
##centos6/7系列安装docker
|
2014-09-05 07:49:58 +00:00
|
|
|
|
|
|
|
|
|
使用EPEL软件仓库可以安装docker,版本必须在centos6 以后
|
2014-09-11 14:52:28 +00:00
|
|
|
|
如果是centos6,用下面的命令安装
|
2014-09-05 07:49:58 +00:00
|
|
|
|
```
|
|
|
|
|
#wget http://mirrors.hustunique.com/epel/6/i386/epel-release-6-8.noarch.rpm
|
|
|
|
|
#rpm -ivhepel-release-6-8.noarch.rpm
|
|
|
|
|
#yum install docker-io
|
|
|
|
|
```
|
2014-09-11 14:52:28 +00:00
|
|
|
|
|
|
|
|
|
centos7 直接通过系统命令安装:
|
|
|
|
|
```
|
|
|
|
|
yum install docker-io
|
|
|
|
|
```
|
|
|
|
|
如果之前的系统中存在docker这个软件,最好先删除掉这个包。
|
|
|
|
|
```
|
|
|
|
|
yum remove docker-io
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
安装之后启动docker服务并添加自动启动到系统服务。
|
2014-09-05 07:49:58 +00:00
|
|
|
|
```
|
|
|
|
|
$ service docker start
|
|
|
|
|
$ chkconfig docker on
|
2014-09-12 07:37:21 +00:00
|
|
|
|
```
|