ipv4固定ip地址
1.vi /etc/sysconfig/network-scripts/ifcfg-enp7s0f0 ##在后面添加ip和域名解析
IPADDR="192.168.130.34"
PREFIX="24"
GATEWAY="192.168.130.1"
DNS1="192.168.120.254"
DNS2="233.5.5.5"
2.systemctl restart network ##重启网卡服务
3.ip a看到双ip地址,主要为了xshell不断(确保配置不错误再断开连接)
4.vi /etc/sysconfig/network-scripts/ifcfg-enp7s0f0
BOOTPROTO=none
5.systemctl restart network
6.hostnamectl set-hostname 6hao.com ##更改主机名称