CentOS 7 virtual machine installation docker


Windows 10 home edition cannot install docker. You can upgrade to windows professional edition and then install it or use CentOS system of virtual machine. This paper takes CentOS 7.6 virtual machine + docker 18.06 (to run rancher) as an example to introduce the specific installation steps.

1. Install CentOS virtual machine

1.1 download and install wmware player officially

1.2 download CentOS image

Take CentOS 7.6 as an example. The download path of the standard version is as follows:

1.3 open wmware player and install CentOS image

Root password and new user account need to be set during installation

2. Configure CentOS and environment

2.1 start and log in to CentOS (root or sudo user)

2.2 configure Yum update and update the system

If the yum update command reports the following error information:

can not find a valid baseurl for repo: base/7/x86_64

Modify the following configuration and restart the system:

vi /etc/sysconfig/network-scripts/ifcfg-ens33
Change onboot = no in the last line to onboot = yes
WQ exit

Execute Yum update to update the system:

yum update

2.3 install and configure ifconfig for later use

yum install net-tools

2.4 install Yum utils to use Yum config manager

yum install yum-utils

3. Install docker

3.1 add a domestic Alibaba cloud image:

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

CentOS 7 virtual machine installation docker

3.2 view all docker versions

yum list docker-ce --showduplicates | sort -r

CentOS 7 virtual machine installation docker

3.3 installing docker

Install the latest version

yum install docker-ce

Or install the specified version, such as:

yum install docker-ce-18.06.3.ce

After installation, you can check through docker version:
CentOS 7 virtual machine installation docker

3.4 start docker

Start docker

service docker start

If necessary, you can set power on self start:

systemctl start docker
systemctl enable docker

A simple and efficient light code development framework for diboot

Recommended Today

PHP calls cjieba word segmentation through FFI

This paper attempts to use the FFI test of PHP 7.4 to directly call the dynamic library of cjieba word segmentation. The reason for choosing cjieba is that FFI uses the calling convention of C. If you use CPP, you have to wrap it yourself, and then use external C to let the compiler generate […]