Create an Ubuntu 16 VM prototype
There are a few old computers at home, can be used as servers, through the router to form a LAN. A cluster of services can be tested by running several virtual machines on each computer connected to each other.
This article describes how to create a virtual machine prototype that can be cloned every time a new virtual machine server is needed. This article is based on CentOS, and I have explored the creation method based on Ubuntu 16.
Step1 create an operating system
Step2 enable the root user
sudo passwd -u root
Step3 configure network adapters
If there is no network card information, use the dhclient command to assign one.
After recording the network adapter information, edit the vim /etc/network/interfaces file to assign static IP addresses, gateways, subnet masks, and DNS information. Tencent DNS is used here.
After finishing ping Baidu, ping another online computer in the LAN, ping this virtual machine server from another computer, the test is correct.
Step4 enable remote SSH login
SSH vim /etc/ssh/sshd.config:
ListenAddress 0.0.0.0 PermitRootLogin yes Copy the code
Next time you need a new server, clone it from this one.