当前位置: 移动技术网 > 科技>操作系统>Linux > VMware WorkStation15 + CentOS7 虚拟机配置初始化

VMware WorkStation15 + CentOS7 虚拟机配置初始化

2019年01月18日  | 移动技术网科技  | 我要评论

1、安装vm-tools

vmware workstation ---> vm ---> reinstall vmware tools

tar -zxvf ~/tools/vmwaretools-10.3.2-9925305.tar.gz -c /root/
~/vmware-tools-distrib/vmware-install.pl

2、linux不休眠

vim /etc/systemd/logind.conf
handlelidswitch=lock

3、修改ip地址(静态)与dns

vim /etc/sysconfig/network-scripts/ifcfg-ethxxxx
dns1=114.114.114.114
bootproto=static
ipaddr=192.168.156.120
gateway=192.168.156.2
netmask=255.255.255.0
nm_controlled=no
onboot=yes

4、重启网络服务

service network restart

5、永久关闭防火墙和selinux

systemctl stop firewalld.service
systemctl disable firewalld.service
chkconfig iptables off
setenforce 0
vi /etc/selinux/config
selinux=disabled

6、重启linux

reboot

7、注意事项

(1)查看虚拟机网关与ip地址范围

vmware workstation--->edit--->vitual network editor--->nat vmnet8--->nat settings--->gateway ip

vmware workstation--->edit--->vitual network editor--->nat vmnet8--->dhcp settings --->starting/ending ip address

(2)修改虚拟机网关或ip

vmware workstation--->edit--->vitual network editor--->change settings--->授权--->进入对应位置修改

(3)linux的ip地址、网关的设置与虚拟机的网卡设置要相匹配

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网