|
来源:http://www.phpkoo.com/archives/305
官方建议使用centos7部署docker1.9.1。
目前,很多系统仍为centos6.8,本文用于测试将centos6.8升级至1.9.1.
查看系统版本
$ more /etc/issueCentOS>Kernel \r on an \m 查看内核版本
$ uname -r2.6.32-573.22.1.el6.x86_64 升级内核至3.10
$ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org$ cd /etc/yum.repos.d/$ rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm$ yum --enablerepo=elrepo-kernel install kernel-lt -y 升级完毕,修改grup并进行重启。
修改grub.conf文件default值为0
$ vim /etc/grub.conf # grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE: You do not have a /boot partition. This means that# all kernel and initrd paths are># root (hd0,0)# kernel /boot/vmlinuz-version ro root=/dev/vda1# initrd /boot/initrd-[generic-]version.img#boot=/dev/vdadefault=0timeout=5splashimage=(hd0,0)/boot/grub/splash.xpm.gzhiddenmenutitle CentOS (3.10.105-1.el6.elrepo.x86_64) root (hd0,0) kernel /boot/vmlinuz-3.10.105-1.el6.elrepo.x86_64 ro root=UUID=55d851da-601d-440a-b119-4fcd9cde4d02 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /boot/initramfs-3.10.105-1.el6.elrepo.x86_64.imgtitle CentOS (2.6.32-642.6.2.el6.x86_64) root (hd0,0) kernel /boot/vmlinuz-2.6.32-642.6.2.el6.x86_64 ro root=UUID=55d851da-601d-440a-b119-4fcd9cde4d02 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /boot/initramfs-2.6.32-642.6.2.el6.x86_64.img 重启系统
$ reboot 重启后查看版本
$ uname -r3.10.105-1.el6.elrepo.x86_64 安装docker 1.9.1
$ curl -sSL -O https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 && chmod +x docker-1.9.1 && mv docker-1.9.1 /usr/local/bin/docker$ cp /usr/local/bin/docker /usr/bin/docker$ service docker start 重启后验证
$ docker versionClient: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: linux/amd64 Server: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: linux/amd64 |
|
|
|
|
|
|