December 2017

On the 23rd, my luck really exploded. I didn't need money to buy water because there was a bug. After verification, I found that I had got 188 red envelope for no reason

The 24th somehow became a hot comment, but also draw a small mushroom to send the award

PS: of course, I don't know women's clothes ({}) ", so I'll send them to my female friends

 Screenshot_ 20171224-003057.png

 Screenshot_ 20171224-003106.png

 Screenshot_ 20171224-004310.png

 Screenshot_ 20171227-122305.png

 Screenshot_ 20171227-122137.png

Direct use is not recommended here sudo yum install -y docker-ce To install docker, the docker version of CentOS with its own source will be relatively old, or it may not exist at all

What I'm talking about here is that CentOS Linux release 7.4.1708 (Core) Operating in the environment of, theoretically centos7 currency

0. Preparation operation

For the operation recommended by the government, delete the old docker related software existing in the computer first

 sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine

Install the necessary tools

 sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

Add docker's own official source

 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

At this point, of course, you can use it sudo yum install docker-ce The latest docker community version is installed. If you have special requirements or don't want to use the latest edge version, you can continue to read

1. Start

This is the first time you have installed docker

use yum list docker-ce --showduplicates | sort -r View the version number of the current docker community version and select Install

 #This is the relevant version information when I wrote this article 
 docker-ce.x86_ 64            17.11.0.ce-1.el7.centos             @docker-ce-edge
docker-ce.x86_ 64            17.09.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_ 64            17.03.0.ce-1.el7.centos             docker-ce-stable

The first column is Package name
The second column is Version name
The third column is Identification stability or testing

Of course, we can't install the guy in the first line today, at least we can install those under the first line

We need to put the listed information into the package name for installation

Take the second line

 docker-ce.x86_ 64            17.09.0.ce-1.el7.centos             docker-ce-stable

Package name = first half of the first column point number + '-' + second column

Intermediate use - connect

The package name is soy sauce purple docker-ce-17.09.0.ce-1.el7.centos

Now you can start installing

 sudo yum install docker-ce-17.09.0.ce-1.el7.centos

。。。 Waiting for the installation to be completed, a long installation process (the installation time will vary depending on the machine performance and configuration)

After installation, you can perform the following operations

 #Enable docker 
 sudo systemctl start docker 
 add boot start (optional) 
 sudo systemctl enable docker

Try docker?

 #Check whether the version information is consistent with that of the installation

Normal execution, output is OK

PS: if you don't use it root For account login, you need to add a docker group to add the current user to the docker group

 #Why do I not need to add the user resto user group

2. Install docker compose (optional)

I can't tell you what it's like now. After all, it's only two days after all

Here, I'll intercept the introduction to you from unknown places

Docker compose is the last part of the docker choreography service. The machine mentioned above allows users to quickly install docker on other platforms. Swarm can make the docker container run efficiently in the cluster. Compose allows users to deploy distributed applications in the cluster. In short, docker compose belongs to an "application layer" service. Users can define which container group to run which application. It supports dynamic change of applications and extends when necessary.

Official installation command, version number 1.17.0 can replace the latest, View GitHub page

 sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Modify command permissions

 sudo chmod +x /usr/local/bin/docker-compose

View version information

 docker-compose version

It's impossible to write the next one. It's almost impossible for this generation to get spicy. It's fun to play games on steam, and there are so many beautiful Da Diao Meng Mei. She talks well. I like to stir fry chicken there. What's next? It can't be spicy

I installed a docker today. I want to try the stress test with the service attached

I tried it on my own server ab Command, appear zsh: command not found: ab

Well, we need to install it, sudo yum search ab It's strange to tell me that there are no packages available

Find document

solve

 sudo yum provides /usr/bin/ab
 Loading mirror speeds from cached hostfile
 * base: mirror.fileplanet.com
 * elrepo: ftp.yz.yamagata-u.ac.jp
 * epel: dl.fedoraproject.org
 * extras: mirror.fileplanet.com
 * updates: mirror.fileplanet.com
httpd-tools-2.4.6-67.el7.centos.x86_ 64: tools for use with the Apache HTTP server 
 source: base 
 matching source: 
 file name / usr / bin / AB

use httpd-tools-2.4.6-67.el7.centos.x86_ sixty-four This bag name

implement

 sudo yum install -y httpd-tools-2.4.6-67.el7.centos.x86_ sixty-four

Installation complete, mizzi

Update in the evening docker , Mastodon , Gitlab Related articles