2014-11-18 09:56:15 +00:00
|
|
|
|
## CentOS 系列安裝 Docker
|
2014-09-05 07:49:58 +00:00
|
|
|
|
|
2014-11-18 09:56:15 +00:00
|
|
|
|
Docker 支持 CentOS6 及以後的版本。
|
2014-09-11 14:52:28 +00:00
|
|
|
|
|
2014-09-26 06:14:13 +00:00
|
|
|
|
### CentOS6
|
2014-11-24 14:51:16 +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-11-22 06:55:29 +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-11-24 14:51:16 +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
|
|
|
|
```
|