本文共 919 字,大约阅读时间需要 3 分钟。
cd /etc/sysconfig/network-scripts 
ifcfg-ens33vim ifcfg-ens33 编辑该网卡BOOTPROTO=DHCP改为BOOTPROTO=staticONBOOT=no改为ONBOOT=yesIPADDR=192.168.1.80NETMASK=255.255.255.0GATEWAY=192.168.1.1DNS1=114.114.114.114DNS2=8.8.8.8
\cp -r /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup && curl -fsSL 'http://mirrors.163.com/.help/CentOS7-Base-163.repo' -o /etc/yum.repos.d/CentOS-Base.repo && yum clean all && yum makecachehttp://mirrors.163.com/.help/centos.html/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupyum clean all yum makecache
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 使用命令关闭防火墙reboot 重启主机转载地址:http://hasi.baihongyu.com/