Centos6.5 install docker

1. Upgrade CentOS 6.5 kernel to 3.10.28

1. Import public key

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2. Install ELRepo to CentOS-6.5

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

3. Install kernel-lt (lt=long-term)

yum --enablerepo=elrepo-kernel install kernel-lt -y

4. Edit the grub.conf file and modify the Grub boot order

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 relative to /, eg.
# root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.28-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8
rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-3.10.28-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-431.3.1.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=en_US.UTF-8 r
d_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img
title CentOS (2.6.32-431.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6. 32-431.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO
_LVM rd_NO_DM rhgb
        initrd-quiet/boot/initramf 2.6.32-431.el6.x86_64.img
Confirm the location of the newly installed kernel, and then set the default value (starting from 0). Generally, the newly installed kernel is in the first location, so set default=0.

5. Restart and check the kernel version number

[root@dev ~]# uname -r
3.10.28-1.el6.elrepo.x86_64

2. An error occurred:
docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference

Solution:
yum upgrade device-mapper-libs

3. An error occurred:
WARN[0000] Your kernel does not support cgroup memory limit: mountpoint for memory not found
WARN[0000] mountpoint for cpu not found                
FATA[0000] Error mounting devices cgroup: mountpoint for devices not found

solution:
The cgroup is not mounted on the host.
vim /etc/fstab
add
none /sys/fs/cgroup cgroup defaults 0 0
to restart the machine

4. A warning appears:
WARN[0000] Running modprobe bridge nf_nat failed with message: , error: exit status 1
WARN[0000] Your kernel does not support swap memory limit.

Solution:
Change the operating system cenos7 instead of docker 1.7.1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326223043&siteId=291194637