mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-25 14:38:54 +00:00
Update the instruction with latest official document
This commit is contained in:
parent
b94178ee16
commit
d544c2949f
@ -1,23 +1,19 @@
|
|||||||
##centos6/7系列安装docker
|
## CentOS系列安装docker
|
||||||
|
|
||||||
使用EPEL软件仓库可以安装docker,版本必须在centos6 以后
|
Docker支持CentOS6及以后的版本。
|
||||||
如果是centos6,用下面的命令安装
|
|
||||||
|
对于CentOS6,可以使用[EPEL](https://fedoraproject.org/wiki/EPEL)库安装Docker,命令如下
|
||||||
```
|
```
|
||||||
#wget http://mirrors.hustunique.com/epel/6/i386/epel-release-6-8.noarch.rpm
|
$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
|
||||||
#rpm -ivhepel-release-6-8.noarch.rpm
|
$ sudo yum install docker-io
|
||||||
#yum install docker-io
|
|
||||||
```
|
```
|
||||||
|
|
||||||
centos7 直接通过系统命令安装:
|
CentOS7系统CentOS-Extras库中已带Docker,可以直接安装:
|
||||||
```
|
```
|
||||||
yum install docker
|
$ sudo yum install docker
|
||||||
```
|
|
||||||
如果之前的系统中存在docker这个软件,最好先删除掉这个包。
|
|
||||||
```
|
|
||||||
yum remove docker-io
|
|
||||||
```
|
```
|
||||||
|
|
||||||
安装之后启动docker服务并添加自动启动到系统服务。
|
安装之后启动Docker服务,并让它随系统启动自动启动。
|
||||||
```
|
```
|
||||||
$ service docker start
|
$ service docker start
|
||||||
$ chkconfig docker on
|
$ chkconfig docker on
|
||||||
|
Loading…
Reference in New Issue
Block a user