Centos6.7 install Docker and centos6.7docker

Source: Internet
Author: User
Tags yum repolist metalink

Centos6.7 install Docker and centos6.7docker
1. view the system version

 

[root@localhost ~]# cat /etc/redhat-release CentOS release 6.7 (Final)

 

  

 

Ii. Install EPEL

1. Enter the centos6 EPEL Series

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. Install EPEL with rpm (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 ID 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 created
3. Disable selinux

1. 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: mirrors.hust.edu.cn * 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 docker-io-1.7.1-2.el6.x86_6 by the Software Package 4. You need to --> execute the 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-lx C. 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? 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 Processes

[root@localhost ~]# 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[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 ~]# uname -r2.6.32-573.3.1.el6.x86_64

According to the official docker documentation, at least 3.8 of Linux kernel is required.

When running docker in the daemon mode on a new terminal, there will be 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.