码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS6.5安装docker

时间:2018-07-16 21:08:24      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:generate   ras   making   auto   type   roo   hid   fedora   ini   

先用CentOS6.5安装docker-io学习着,什么历史、优势、特点先不扯了。

升级内核

yum安装带aufs模块的3.10内核

[root@docker-machine_192.168.31.129 ~]# cd /etc/yum.repos.d 
[root@docker-machine_192.168.31.129 ~]# wget http://www.hop5.in/yum/el6/hop5.repo
[root@docker-machine_192.168.31.129 ~]# yum clean all
[root@docker-machine_192.168.31.129 ~]# yum install -y kernel-ml-aufs kernel-ml-aufs-devel

修改grub:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.5-3.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-3.10.5-3.el6.x86_64 ro root=UUID=c29afc67-d24a-412c-8d22-9048ada1f057 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD
SYSFONT=latarcyrheb-sun16 rd_NO_LVM crashkernel=auto rhgb quiet rd_NO_DM rhgb quiet
    initrd /initramfs-3.10.5-3.el6.x86_64.img
title MyCentOS_mini-base (2.6.32-431.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=c29afc67-d24a-412c-8d22-9048ada1f057 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_M
D SYSFONT=latarcyrheb-sun16 rd_NO_LVM crashkernel=auto rhgb quiet rd_NO_DM rhgb quiet
    initrd /initramfs-2.6.32-431.el6.x86_64.img

重启

查看内核:

[root@docker-machine_192.168.31.129 ~]# uname -r
3.10.5-3.el6.x86_64

安装docker

epel源:

rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
sed -i ‘s/^mirrorlist=https/mirrorlist=http/‘ /etc/yum.repos.d/epel.repo

安装docker:

yum install -y docker-io

启动:

[root@docker-machine_192.168.31.129 ~]# mv /var/lib/docker /data/
[root@docker-machine_192.168.31.129 ~]# ln -sv /data/docker /varlib/docker
`/data/docker‘ -> `/varlib/docker‘
[root@docker-machine_192.168.31.129 ~]# /etc/init.d/docker start 
Starting docker:                                           [  OK  ]

瞄一眼:

[root@docker-machine_192.168.31.129 ~]# docker version 
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d/1.7.1
OS/Arch (server): linux/amd64

CentOS6.5安装docker

标签:generate   ras   making   auto   type   roo   hid   fedora   ini   

原文地址:https://www.cnblogs.com/wshenjin/p/9319923.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!