debian7 安装docker 首先升级内核
由于docker官方说 内核至少要 3.10以上 所以需要升级
一、添加backports源
打开/etc/apt/source.list文件,加入以下:
deb http://ftp.debian.org/debian/ wheezy-backports main
或:
deb http://http.debian.net/debian wheezy-backports main
更新源文件:
apt-get update
二、更新backsports源
apt-get -t wheezy-backports upgrade
等待片刻 跳出交互 选是
查找新内核
aptitude search linux-image
可以发现有3.16的内核。
p linux-image-3.16.0-0.bpo.4-amd64 - Linux 3.16 for 64-bit PCs
p linux-image-3.16.0-0.bpo.4-amd64-dbg - Debugging symbols for Linux 3.16.0-0.bpo.4-amd64
三、安装新内核
apt-get -t wheezy-backports install linux-image-3.16.0-0.bpo.4-amd64
或:
apt-get -t wheezy-backports install linux-image-amd64
安装完后重启电脑
root@NimbleViolet-VM:~# uname -a
Linux NimbleViolet-VM 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.39-1+deb8u1~bpo70+1 (2017-02-24) x86_64 GNU/Linux
查看有几个内核 删除旧的:
dpkg --get-selections |grep linux-image
linux-image-3.16.0-0.bpo.4-amd64 install
linux-image-3.2.0-4-amd64 install
linux-image-amd64 install
如果要删除旧内核:
apt-get remove linux-image-3.2.0-4-amd64
参考文献:
https://www.cnblogs.com/ibgo/p/4113940.html