CENTOS6.7 install DOCKER

Source: Internet
Author: User

CENTOS6.7 install DOCKER
1. view the system version [root @ localhost ~] # Cat/etc/redhat-releaseCentOS release 6.7 (Final) II. Install EPEL 1. Go to centos6 EPEL http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html 2. wget download [root @ localhost ~] # Wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm--2015-09-10 17:50:49 -- getting started... 67.219.144.68, 209.132.181.16, 66.35.62.162,... connecting download.fedoraproject.org | 67.219.144.68 |: 80... connected. An HTTP request has been sent and is waiting for response... 302 Found location: http://mirrors.opencas.cn/epel/6/i386/epel-release-6-8.noarch.rpm [following the new URL] -- 17:50:50 -- http://mirrors.opencas.cn/epel/6/ I #/epel-release-6-8.noarch.rpmis on the guest host mirrors.opencas.cn... 159.226.11.160, 2001: cc0: 2004: 1: 225: 90ff: fe00: fe8b, 2001: cc0: 2004: 1: 225: 90ff: fe3a: e6b5 connecting mirrors.opencas.cn | 159.226.11.160 |: 80... connected. An HTTP request has been sent and is waiting for response... 200 OK length: 14540 (14 K) [application/x-redhat-package-manager] is being saved: "epel-release-6-8.noarch.rpm" 100% [= ========================================================== =====================>] 14,540 12.9 K/s in 1.1 s 17:50:56 (12.9 KB/s) -Saved epel-release-6-8.noarch.rpm [14540/14540]) 3. run rpm to install EPEL (I have installed EPEL, so it is displayed that it has been installed) [root @ localhost ~] # 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 the EPEL source is installed, run the yum command to check whether it is added to the source list root @ localhost ~]. # Yum repolist loaded plug-ins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile * base: Using * epel: Using 01.idc.hinet.net * extras: mirrors.163.com repository identification repository name status base CentOS-6-Base 6,575 * epel Extra Packages for Enterprise Linux 6-x86_64 11,766 extras CentOS-6-Extras 35 updates CentOS-6-Updates 298 repolist: 18,674 5. bingo, already added. Cache. [Root @ localhost ~] # Yum makecache loaded Plugin: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfilecocould 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: (28, 'Operation too slow. less than 1 bytes/sec transfered the last 30 seconds ') * base: pai* epel: ftp.cuhk.edu.hk * extras: centos.ustc.edu.cn * updates: centos.ustc.edu. cnbase | 3.7 kB extras | 3.4 kB updates | 3.4 kB metadata cache has been created. 3. selinux 1 is disabled. view selinux status

[root@localhost ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:#     enforcing - SELinux security policy is enforced.#     permissive - SELinux prints warnings instead of enforcing.#     disabled - No SELinux policy is loaded.SELINUX=enforcing# SELINUXTYPE= can take one of these two values:#     targeted - Targeted processes are protected,#     mls - Multi Level Security protection.SELINUXTYPE=targeted
2. modify the configuration file to replace enforcing with disabled.
[root@localhost ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:#     enforcing - SELinux security policy is enforced.#     permissive - SELinux prints warnings instead of enforcing.#     disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:#     targeted - Targeted processes are protected,#     mls - Multi Level Security protection.SELINUXTYPE=targeted

 

3. restart the system for reboot to take effect. 4. Be ready to install docker-io. [Root @ localhost ~] # Yum install docker-io loaded plug-ins: fastestmirror, refresh-packagekit, security setting Installation Process
Loading mirror speeds from cached hostfile * base: Drawing * epel: ftp.cuhk.edu.hk * extras: mirrors.163.com * updates: mirrors.163.com resolve dependencies --> execute transaction check ---> Package docker-io.x86_64. 7.1-2. el6 will be installed --> handle dependency lxc, which is required by the software Package docker-io-1.7.1-2.el6.x86_64 --> handle dependency libcgroup, which is required by the software Package docker-io-1.7.1-2.el6.x86_64 --> execute transaction check --> Package libcgroup. x86_64 0: 0. 40. rc1-16.el6 will be installed ---> Package lxc. x86_64. 0.7-2. el6 will be installed --> handle dependency lua-lxc (x86-64) = 1.0.7-2. el6, which is required by the software package lxc-1.0.7-2.el6.x86_64 --> handle dependency lua-alt-getopt, which is required by the software package lxc-1.0.7-2.el6.x86_64 --> handle dependency liblxc. so.1 () (64bit), which is required by the Package lxc-1.0.7-2.el6.x86_64 --> execute the transaction check --> Package lua-alt-getopt.noarch 0: 0. 7.0-1. el6 will be installed ---> Package lua-lxc.x86_64. 0.7-2. el6 will be installed --> handle dependency lua-filesystem, which is required by the Package lua-lxc-1.0.7-2.el6.x86_64 ---> Package lxc-libs.x86_64. 0.7-2. el6 will be installed --> execute transaction check ---> Package lua-filesystem.x86_64. 4.2-1. el6 will be installed --> complete dependency calculation dependency solution ======================== ========================================================== ========================================================== ==================================================== Software Package Architecture version repository size ================================================= ========================================================== ========================================================== ==================================== installing: docker-io x86_64 1.7.1-2. install el6 epel 4.6 M 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 24 k lua-lxc x86_64 1.0.7-2. el6 epel 15 k lxc x86_64 1.0.7-2. el6 epel 120 k lxc-libs x86_64 1.0.7-2. el6 epel 250 k transaction summary ==================================== ========================================================== ========================================================== ================================ Install 7 Package (s)

 

Total downloads: 5.1 MInstalled size: 20 m OK? [Y/N]: Do you still need to explain it? All the way down to y. Start our baby docker [root @ localhost ~] #/Etc/init. d/docker startStarting cgconfig service: [OK] Starting docker: [OK] view docker process [root @ localhost ~] # Ps-ef | grep dockerroot 3602 1 0 00:00:00 pts/0 00:00:00/usr/bin/docker-droot 3745 3429 0 pts/0 grep docker view installed docker version Status: downloaded newer image for centos: latest [root @ localhost ~] # Docker versionClient version: 1.7.1Client API version: 1.19Go version (client): go1.4.2Git commit (client): 786b29d/1.7.1OS/Arch (client): linux/amd64Server version: 1.7.1Server API version: 1.19Go version (server): go1.4.2Git commit (server): 786b29d/1.7.1OS/Arch (server): linux/amd64 Note: I have not upgraded the system kernel here [root @ localhost ~] # The official uname-r2.6.32-573.3.1.el6.x86 _ 64docker documentation requires at least 3.8 Linux kernel. When running docker in daemon mode on a new terminal, the following error occurs: warning [root @ localhost ~] # Docker-dWARN [0000] You are running linux kernel version 2.6.32-573.3.1.el6.x86 _ 64, which might be unstable running docker. please upgrade your kernel to 3.10.0. however, it indicates that I can use it normally.

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.