#静态ip设置
##查看网络设置
cat /etc/sysconfig/network-scripts/ifcfg-ens33
##修改网络设置
vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=“Ethernet”
PROXY_METHOD=“none”
BROWSER_ONLY=“no”
BOOTPROTO=“static”
DEFROUTE=“yes”
IPV4_FAILURE_FATAL=“no”
IPV6INIT=“yes”
IPV6_AUTOCONF=“yes”
IPV6_DEFROUTE=“yes”
IPV6_FAILURE_FATAL=“no”
IPV6_ADDR_GEN_MODE=“stable-privacy”
NAME=“ens33”
UUID=“5f983cc9-d203-4027-b0eb-c7b2e95e0276”
DEVICE=“ens33”
ONBOOT=“yes”
IPADDR=192.168.1.250
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
#静态DNS设置
##查看DNS
cat /etc/resolv.conf
##设置DNS
vi /etc/resolv.conf
nameserver 223.5.5.5
nameserver 223.6.6.6
namrserver 8.8.8.8
nameserver 8.8.4.4
nameserver 114.114.114.114
service network restart