Record the first installation of docker in centos7

Time:2021-4-19

Because the computer you use is win10, so
1. Install virtual machine (windows can also install docker, but it is better to install it on Linux)
https://www.vmware.com/cn/pro…
In this website download, need to register, and then can download, I download the pro 15 version
2. Get the ISO image of centos7
http://isoredirect.centos.org…
The download address of alicloud image is: http://mirrors.aliyun.com/cen…
3. Install CentOS on virtual machine
Fool type next step, remember to set the root password of centos7 in the installation process
4. Install docker in virtual machine
After the installed CentOS is turned on, it cannot be connected to the Internet, that is, Ping www.baidu.com Unable to Ping
Through the VI / etc / sysconfig / network scripts / ifcfg ENS * * file
Modify the configuration file,Record the first installation of docker in centos7
take

ONBOOT=yes
DNS1=8.8.8.8
DNS2=114.114.114.114

Add in
then! Also need to restart the network service, so that you can download things online
start-up

service network start

close

service network stop

restart

service network restart

Then you can download and install docker online
Enter the following command directly:

yum -y install docker

It can be started immediately after installation

systemctl start docker

To query whether the startup is successful or not, use the following command

systemctl status docker

The results are as follows:
Record the first installation of docker in centos7
Prove that the service is started successfully and the docker is installed successfully.

Root user in the whole process, if it is an ordinary user, you need to add sudo command

Recommended Today

Envoy announced alpha version of native support for windows

Author: sunjay Bhatia Since 2016, porting envoy to the windows platform has been an important part of the projectOne of the goalsToday, we are excited to announce the alpha version of envoy’s windows native support. The contributor community has been working hard to bring the rich features of envoy to windows, which is another step […]