VMware新建虚拟机之后的初始化工作
一、开启网络功能(后面的ifcfg-ens33自身系统不同)
vi /etc/sysconfig/network-scripts/ifcfg-ens33
ONBOOT=yes
systemctl restart network
改为桥接
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
IPADDR=192.168.1.45
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
DNS1=192.168.1.1
二、关闭防火墙
systemctl disable firewalld
systemctl stop firewalld
三、关闭selinux
vi /etc/selinux/config
SELINUX=disabled
快捷一条命令:
systemctl disable firewalld && \ systemctl stop firewalld && \ sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config && \ sudo sed -i 's/ONBOOT=no/ONBOOT=yes/g' /etc/sysconfig/network-scripts/ifcfg-ens33 && \ systemctl restart network && \ sudo yum install lrzsz net-tools wget -y
关闭selinux需要重启,reboot下