1.系统安装不再赘述
安装参考连接
2.配置网络参数
2.1 网络适配器选择NAT模式
2.2 在VM中菜单栏点击编辑–>虚拟网络编辑,如图配置。需要主机子网ip的网段需要跟主机的的网段一样
2.3 在CentOS中 打开终端关闭防火墙
centos7 命令如下
systemctl start firewalld.service#启动firewall
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall开机启动
===================================================================
CentOS 6:
1) 永久性生效,重启后不会复原
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后复原
开启: service iptables start
关闭: service iptables stop
2.4 查看 虚拟机中linux ip
3 打开xhell 登录 搞定收工