参考文章:
https://www.nakivo.com/blog/virtualbox-network-setting-guide/
https://help.ubuntu.com/lts/serverguide/openssh-server.html
https://technologyrss.com/configure-static-ip-address-on-ubuntu-19-04/
设置网络为桥接模式
之所以设置为桥接是为了和物理主机在一个局域网
由于我的物理主机是linux,虚拟网卡适配器选择 Paravirtualized Network Adapter (virtio-net),如果是windows应该可以随便选
设置静态IP(ubuntu19)
sudo vim /etc/netplan/50-cloud-init.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.1.101/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
version: 2
sudo netplan apply
替换源
deb http://mirrors.aliyun.com/ubuntu/ disco main restricted universe multiverse
安装基础组件
- sudo apt install openjdk-11-jre