mirror of
https://github.com/yeasy/docker_practice.git
synced 2024-12-25 14:38:54 +00:00
split the installation to two main distributions
This commit is contained in:
parent
79934ad3e1
commit
7fc1ca0733
@ -1,4 +1,4 @@
|
||||
##centos6\7系列安装docker
|
||||
##centos6/7系列安装docker
|
||||
|
||||
使用EPEL软件仓库可以安装docker,版本必须在centos6 以后
|
||||
如果是centos6,用下面的命令安装
|
||||
@ -21,4 +21,4 @@ yum remove docker-io
|
||||
```
|
||||
$ service docker start
|
||||
$ chkconfig docker on
|
||||
```
|
||||
```
|
||||
|
@ -13,19 +13,18 @@ $ sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
|
||||
###通过docker源安装最新版本
|
||||
如果要安装最新的docker版本,那么需要安装apt-get的https支持
|
||||
```
|
||||
$apt-get install apt-transport-https
|
||||
$ sudo apt-get install apt-transport-https
|
||||
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
|
||||
$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main /etc/apt/sources.list.d/docker.list"
|
||||
$ sudo echo "deb https://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list"
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install lxc-docker
|
||||
```
|
||||
|
||||
###其它版本
|
||||
如果是低版本的ubuntu
|
||||
如果是低版本的ubuntu需要先更新内核。
|
||||
```
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
|
||||
# reboot
|
||||
$ sudo reboot
|
||||
```
|
||||
然后重复上面的步骤即可。
|
||||
|
Loading…
Reference in New Issue
Block a user