First, view the system version
[Email protected] ~]# cat/etc/redhat-release CentOS release 6.7 (Final)
Second, installation Epel
1. Enter CENTOS6 series Epel
Http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
2. wget download
[[email protected] ~]# wget http://download.fedoraproject.org/pub/epel/6/i386/ Epel-release-6-8.noarch.rpm--2015-09-10 17:50:49--http://download.fedoraproject.org/pub/epel/6/i386/ EPEL-RELEASE-6-8.NOARCH.RPM Parsing host download.fedoraproject.org ... 67.219.144.68, 209.132.181.16, 66.35.62.162, ... Connecting download.fedoraproject.org|67.219.144.68|:80 ... is connected. An HTTP request has been made and is waiting for a response ... 302 Found location: http://mirrors.opencas.cn/epel/6/i386/epel-release-6-8.noarch.rpm [follow to the new url]--2015-09-10 17:50:50-- HTTP://MIRRORS.OPENCAS.CN/EPEL/6/I386/EPEL-RELEASE-6-8.NOARCH.RPM Parsing host mirrors.opencas.cn ... 159.226.11.160, 2001:cc0:2004:1:225:90ff:fe00:fe8b, 2001:cc0:2004:1:225:90ff:fe3a:e6b5 is connecting mirrors.opencas.cn| 159.226.11.160|:80 ... is connected. An HTTP request has been made and is waiting for a response ... $ OK Length: 14540 (14K) [Application/x-redhat-package-manager] saving to: "epel-release-6-8.noarch.rpm" 100%[============== =========================================================================================>] 14,540 12.9K/s in 1 .1s 2015-09-10 17:50: (12.9 kb/s)-Saved "epel-release-6-8.noarch.rpm" [14540/14540])
3.RPM installation Epel (I have installed, so the display has been installed)
[Email protected] ~]# RPM-IVH epel-release-6-8.noarch.rpmwarning:epel-release-6-8.noarch.rpm:header V3 RSA/SHA256 Signature, key ID 0608b895:nokeypreparing ... ########################################### [100%]package Epel-release-6-8.noarch is already installed
4. After installing the Epel source, use the Yum command to check whether to add to the source list
[email protected] ~]# yum repolist loaded plugin: Fastestmirror, refresh-packagekit, securityloading mirror speeds from Cached Hostfile * base:centos.ustc.edu.cn * epel:mirror01.idc.hinet.net * extras:mirrors.163.com * updates:mirrors.163 . com Warehouse Identity warehouse name State base CentOS-6-base 6,575*epel Extra Packages for Enterprise Linu X 6-x86_64 11,766extras CentOS-6- Extras 35updates CentOS-6-Updates 298repolist:18,67 4
5.bingo, has been added. To cache.
[[email protected] ~]# yum Makecache loaded plugins: Fastestmirror, Refresh-packagekit, securityloading mirror speeds from cached hostfilecould not get Metalink https:// mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was12:timeout on https:// MIRRORS.FEDORAPROJECT.ORG/METALINK?REPO=EPEL-6&ARCH=X86_64: (Operation too slow. Less than 1 bytes/sec transfered the last seconds ') * base:mirrors.hust.edu.cn * epel:ftp.cuhk.edu.hk * extras:cento s.ustc.edu.cn * Updates:centos.ustc.edu.cnbase | 3.7 KB 00:00 Extras | 3.4 KB 00:00 Updates | 3.4 KB 00:00 Metadata Cache established
Third, disable SELinux
1. View SELinux Status
[[email protected] ~]# Cat/etc/selinux/config # This file controls the state of SELinux in the system.# selinux= can take One of these three values:# enforcing-selinux security policy is enforced.# permissive-selinux prints warning s instead of enforcing.# disabled-no SELinux policy is loaded. selinux=enforcing# Selinuxtype= can take one of these, values:# targeted-targeted processes is protected,#
2. Modify the configuration file to replace enforcing with disabled
[[email protected] ~]# Cat/etc/selinux/config # This file controls the state of SELinux in the system.# selinux= can take One of these three values:# enforcing-selinux security policy is enforced.# permissive-selinux prints warning s instead of enforcing.# disabled-no SELinux policy is loaded. selinux=disabled# Selinuxtype= can take one of these, values:# targeted-targeted processes is protected,#
3.reboot reboot the system to make it effective.
Four, ready to install Docker-io, touch the DA.
[[email protected] ~]# yum install Docker-io loaded plugin: Fastestmirror, Refresh-packagekit, security set installation process loading Mirror speeds from Cached Hostfile * base:mirrors.hust.edu.cn * epel:ftp.cuhk.edu.hk * extras:mirrors.163.com * Updates : mirrors.163.com Resolve Dependencies--Perform transaction checking---> Package docker-io.x86_64 0:1.7.1-2.el6 'll be installed--process dependency lxc, which is in the packages dock Er-io-1.7.1-2.el6.x86_64 need-to-handle dependency libcgroup, which is required by package docker-io-1.7.1-2.el6.x86_64--Perform transaction checking---> Packages Libcgroup.x86_64 0:0.40.rc1-16.el6 'll be installed---> Package lxc.x86_64 0:1.0.7-2.el6 'll be install-to-process dependency lua-lxc (x86- = 1.0.7-2.el6, which is required by the package lxc-1.0.7-2.el6.x86_64 and handles dependency lua-alt-getopt, which is required by the package lxc-1.0.7-2.el6.x86_64 Handle Dependency liblxc.so.1 () (64bit), which is required by package lxc-1.0.7-2.el6.x86_64--Perform transaction checks---> Packages lua-alt-getopt.noarch 0:0.7.0-1.el6 'll be installed---> Package lua-lxc.x86_64 0:1.0.7-2.el6 'll be install-to-process dependency Lua-filesystem, it's packaged lua-lxc- 1.0.7-2.EL6.X86_64 Need---> Package lxc-libs.x86_64 0:1.7-2.el6 'll be installed--Perform transaction checking---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 'll be installed--complete dependency calculation dependency resolution ====== =============================================================================================================== ============================ Package schema version Warehouse Size =================================================================================== ============================================================== Installing: Docker-io x86_64 1.7.1-2.el6 Epel 4.6 m installed for dependency: Libcgroup x86_64 0.40.rc1-16.el6 Base 129 k Lua -alt-getopt Noarch 0.7.0-1.el6 Epel 6.9 k Lua-filesystem x86_64 1.4.2-1.el6 Epel K LUA-LXC x86_64 1.0.7-2.el6 Epel K LXC x86_64 1.0.7-2.el6 Epel k lxc-libs x86_64 1.0.7 -2.el6 Epel k Transaction summary ================================================ =================================================================================================install 7 Package (s) Total downloads: 5.1 minstalled size:20 m OK? [y/n]:
Do I have to explain, y go down all the way.
Start our baby Docker
[Email protected] ~]#/etc/init.d/docker startstarting cgconfig Service: [OK]starting docker: [OK]
View the Docker process
[Email protected] ~]# Ps-ef | grep dockerroot 3602 1 0 18:26 pts/0 00:00:00/usr/bin/docker-droot 3745 3429 0 18:27 pts/0 00:00:00 grep Docker
View the installed Docker version
status:downloaded newer image for Centos:latest[[email protected] ~]# docker versionclient version:1.7.1client API Versi On:1.19go version (client): Go1.4.2git commit (client): 786b29d/1.7.1os/arch (client): Linux/amd64server version:1.7.1s Erver API version:1.19go Version (server): Go1.4.2git commit (server): 786b29d/1.7.1os/arch (server): LINUX/AMD64
Attention:
I'm not upgrading the system kernel here.
[Email protected] ~]# uname-r2.6.32-573.3.1.el6.x86_64
The official Docker document says Linux kernel are required to be at least 3.8.
Warning is present when you run Docker in a new terminal daemon mode.
But now I can use it normally.
centos6.7 Installing Docker