In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to create Machine. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
For Docker Machine, the term Machine refers to the host running docker daemon. "create Machine" refers to the installation and deployment of docker on host. First execute docker-machine ls to check the current machine:
As we expected, there is currently no machine, so let's create the first machine: host1-192.168.56.104.
Creating a machine requires the ability to log in to the remote host without a password, so you need to copy the ssh key to 192.168.56.104 with the following command:
Ssh-copy-id 192.168.56.104
When everything is ready, execute the docker-machine create command to create host1:
Docker-machine create-- driver generic--generic-ip-address=192.168.56.104 host1
Because we are deploying docker to a normal Linux, we use generic driver, and other driver can refer to the documentation https://docs.docker.com/machine/drivers/.
-- generic-ip-address specifies the IP of the target system and names it host1. The command execution process is as follows:
① logs in to the remote host through ssh.
② installs docker.
③ copies the certificate.
④ configures docker daemon.
⑤ starts docker.
Execute docker-machine ls again:
You can already see host1. We can log in to host1 to see the specific configuration of docker daemon / etc/systemd/system/docker.service.
-H tcp://0.0.0.0:2376 causes docker daemon to accept remote connections.
-- tls* enables security authentication and encryption for remote connections.
We also see that hostname has been set to host1:
Use the same method to create a host2:
Docker-machine create-- driver generic--generic-ip-address=192.168.56.105 host2
After the docker-machine ls is created successfully, you can see that both host1 and host2 are ready.
The above is the editor for you to share how to create Machine, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.