本文共 919 字,大约阅读时间需要 3 分钟。
cd /etc/sysconfig/network-scripts
ifcfg-ens33
vim ifcfg-ens33
编辑该网卡BOOTPROTO=DHCP
改为BOOTPROTO=static
ONBOOT=no
改为ONBOOT=yes
IPADDR=192.168.1.80
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=114.114.114.114
DNS2=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 makecache
http://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.backup
yum clean all
yum makecache
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
使用命令关闭防火墙reboot
重启主机转载地址:http://hasi.baihongyu.com/