MAC下虚拟机(VirtualBox)安装配置
1.下载文件列表
下载VirtualBox
下载地址:https://www.virtualbox.org/wiki/Downloads
下载centos7.6镜像文件
下载地址:http://mirrors.zju.edu.cn/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso
2.操作系统安装(略)
3.网络配置
3.1使用桥接模式并选择主机当前使用的网卡
3.2手工配置IP地址
step1:ifconfig查看当前使用的网卡及ip地址
[[email protected] ~]# ifconfig
step2:修改该网卡配置文件
[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
主要对IPADDR&GATEWAY进行设置 GATEWAY与主机相同即可。
step3:重启网络服务
[[email protected] ~]# service network restart
4.设置机器名
[[email protected] ~]# hostnamectl set-hostname slave2
注:该命令重启后依然生效