VMware WorkStation15 + CentOS7 虚拟机配置初始化
程序员文章站
2024-02-06 12:57:40
1、安装VM Tools VMware Workstation VM Reinstall VMware Tools 2、Linux不休眠 3、修改IP地址(静态)与DNS 4、重启网络服务 5、永久关闭防火墙和Selinux 6、重启Linux 7、注意事项 (1)查看虚拟机网关与IP地址范围 (2 ......
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地址、网关的设置与虚拟机的网卡设置要相匹配