December 2018
M T W T F S S
« Nov    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories

WordPress Quotes

If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau

Recent Comments

December 2018
M T W T F S S
« Nov    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (34)
Ansibile (19)
Apache (133)
Asterisk (2)
cassandra (2)
Centos (209)
Centos RHEL 7 (259)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (28)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (2)
Ldap (5)
Linux (189)
Linux Commands (167)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (22)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (31)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (34)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (60)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

31 visitors online now
0 guests, 31 bots, 0 members

Hit Counter provided by dental implants orange county

Docker centos 6.9

Docker requires a Linux kernel version of 3.8 or higher, you must check the kernel version of the host operating system before installation. Otherwise, if the kernel is lower than 3.8, Docker can be successfully installed, but after entering Docker, it will automatically exit. .

1. Download and install CentOS 6.9

CentOS 6 series, the latest version is 6.9, because Docker can only run on 64-bit systems, so select an image download CentOS 6.9 64-bit CentOS official website

2, upgrade CentOS Linux kernel

CentOS 6.9 default linux kernel version is 2.6, CentOS 7 default linux kernel version is 3.10, so for CentOS 6.9 you need to upgrade the kernel version

1) Enter the URL of the updated linux kernel http://elrepo.org/tiki/tiki-index.php

2) Follow the instructions to update the kernel and execute the following command in the root account

(1) import public key

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

(2) Install ELRepo

For Centos 6,

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

For Cenos7,

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm (external link)

(3) Install the kernel

Long-term supported version, stable (recommended)

yum --enablerepo=elrepo-kernel install -y kernel-lt

Mainline version (mainline)

yum --enablerepo=elrepo-kernel install -y kernel-ml

(4) modify the Grub boot sequence, set the default startup of the newly upgraded kernel

Edit grub.conf file

vi /etc/grub.conf

Modify default to the location of the newly installed kernel

# grub.conf generated by anaconda
#
default=0    
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (3.10.28-1.el6.elrepo.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-3.10.28-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-431.3.1.el6.x86_64)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img

(5) Restart, kernel upgrade completed

reboot

3, install docker

(1) disable selinux

Because selinux and LXC have conflicts, selinux is disabled

vi /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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

(2) Configure Fedora EPEL source

Because Docker 6.x and 7.x installation docker is a little different, the docker installation package for CentOS 6.x is called docker-io, which comes from the Fedora epel library. This repository maintains a large number of packages that are not included in the distribution. Software, so first install EPEL, and docker for CentOS 7.x is directly included in the Extras repository of the official image source (the [extras] section enable=1 enable under CentOS-Base.repo)

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

(3) Install docker

Install docker-io

yum install -y docker-io

(4) start docker

service docker start

(5) Check Docker Version

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

(6) Perform docker hello-world

Pull hello-world image

docker pull hello-world

Run hello-world

docker run hello-world
Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (Assuming it was not already locally available.)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

For more examples and ideas, visit:
 http://docs.docker.com/userguide/

The above output message indicates that Docker has been completely installed

4, uninstall Docker

If you want to uninstall docker, it is very simple, check the docker installation package

yum list installed | grep docker

Then delete the installation package

yum -y remove docker-io.x86_64

Delete a mirror or container

rm -rf /var/lib/docker

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam