我是ubuntu的新手,需要安装ubuntu xenial服务器(16.04)版才能将MongoDB安装到VirtualBox中。安装后,我尝试从dhcp更改为静态ipv4地址。所以我改变了/ etc / network / interfaces:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.56.5
netmask 255.255.255.0
gateway 192.168.56.1
并重新启动服务器
# but ifconfig -a shows only an enp0s3 interface without any IP address
and
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
up loopback running MTU: ...
(抱歉,复制和粘贴无效,因此我必须全部输入)
did a reboot once more and tried sudo ifdown and afterwards ifup eth0
# but it gives allways :
Cannot find device "eth0"
Failed to bring up eth0
VirtualBox网络适配器设置为仅主机适配器,我已经在192,168.56.4上运行了另一个带有Debian8的VirtualBox。
有人对我有帮助吗?
sudo lshw -C network | grep 'logical name'