赞
踩
配置静态IP:vi /etc/sysconfig/network-scripts/ifcfg-eth0
将配置文件改成如下即可。其中网关为mac电脑的网关地址。
DEVICE="eth0"
#IPV6INIT="yes"
#BOOTPROTO="dhcp"
UUID="19cdf43b-c3dd-4a8b-9e32-3285d1787543"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="192.168.31.110"
GATEWAY="192.168.31.1"
NETMASK="255.255.255.0"
DNS1=192.168.31.1
DNS2=8.8.8.8
重置网络服务
service network restart
把网络改成桥接wifi
测试外网:ping www.baidu.com
查看 ip:ip addr
修改主机名:vi /etc/hostname
重启:reboot
FinalShell远程虚拟机,mac电脑需要打开22端口。
可以做主机名与IP地址的映射
打开Mac的hosts文件,在/private/etc/hosts下。
在hosts文件中添加,IP地址和要映射的名字,如下所示。
192.168.31.110 node1 node1.itcst.cn
192.168.31.111 node2 node2.itcst.cn
192.168.31.112 node3 node3.itcst.cn
此时可以 ping 192.168.31.110 === ping node1 == ping node1.itcst.cn。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。