Centos6.5 Upgrade the kernel and install Docker

Source: Internet
Author: User
Tags gpg centos

First, kernel upgrade, upgrade from 2.6 to 3.10.107

1, first determine the current kernel version

# uname-r
2.6.32-220.el6.x86_64
# cat/etc/centos-release 
CentOS Release 6.5 (Final)

2. Install dependent development environment and Development Library

# yum Grouplist  //view installed and not installed package groups to determine if we have the appropriate development environment and Development library installed;
# yum Groupinstall "Development Tools"  // It is generally the case that you install the two package groups, which will determine that you have all the tools you need to compile it
# yum Install ncurses-devel//You must do this to make *config this command execute the
# Yum install correctly Qt-devel//If you don't have an X environment, this can be used without the
# yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel//Create CentOS-6 kernel Need them

3, obtain the kernel source code, download the source package from www.kernel.org upload or this line of command, it is best to take longterm version of the

wget  Https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.107.tar.xz

4. Start upgrading the kernel

cd/usr/src/linux-3.10.107
 #复制原内核配置 
 cp/boot/config-2.6.32-71.el6.x86_64. config 
 vim. config/
 * Add the following to the. config and save. It's important, otherwise Docker won't get up
    config_nf_nat_ipv4=y
    config_ip_nf_target_masquerade=y
    config_netfilter_xt_ Match_addrtype=y
    config_memcg_swap=y
    config_memcg_swap_enabled=y
    config_aufs_fs=y
    CONFIG_DM_ Thin_provisioning=y
    config_overlay_fs=y
    config_cgroup_perf=y
    config_cfs_bandwidth=y
    Hypervisor_guest=y
    config_vmware_balloon=m
 */
 #编辑内核配置, open kernel cgroup support make
 menuconfig
 # Select Setup-->control Group support->memory Resource Controller for Control groups select
 #自动整理. config
 Sh-c ' Yes ' | Make Oldconfig '
 #编译并安装内核 (J4 on behalf of 4 threads at the same time, please set according to your machine)
 make-j4 bzimage && make-j4 modules && Make-j4 modules_install && make install
 vim/etc/grub.conf 
 Modify default=0 save. That is, choose to boot Linux from your newly compiled kernel.
 #重启生效
 


5. Last execution uname-a see if the upgrade was successful

Second, install Docker

Rpm-ivh http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm--import/etc/pki/rpm-gpg/ rpm-gpg-key-epel-6
yum-y Install Docker-io
service docker start
 #设置开机启动
chkconfig Docker on


third, the question:

You may encounter the cannot connect to the Docker daemon. Is ' docker-d ' running on this host? " This problem generally occurs in three different situations:

1, the service does not start;

2, the authority is not root;

3, a library version is too low, and then execute a

Yum-config-manager--enable public_ol6_latest
yum Install Device-mapper-event-libs
If you still can't find the problem above, you can do docker-d to see what the problem is.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.