您好,欢迎访问一九零五行业门户网

centos7怎么设置ip地址

首先打开ifcfg-eth0 文件
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
然后修改如下内容
bootproto="static" #dhcp改为static onboot="yes" #开机启用本配置 ipaddr=192.168.7.106 #静态ip gateway=192.168.7.1 #默认网关 netmask=255.255.255.0 #子网掩码 dns1=192.168.7.1 #dns 配置
最后重启网络服务
# service network restart
推荐教程:centos教程
以上就是centos7怎么设置ip地址的详细内容。
其它类似信息

推荐信息