931 B
931 B
title | description | published | date | tags | editor | dateCreated |
---|---|---|---|---|---|---|
常见问题 | 常见问题和处理方法 | true | 2021-08-05T08:58:32.044Z | centos | markdown | 2021-08-05T08:58:32.044Z |
新安装系统无法上网
- 确认网线已经插好
- 编辑IP配置文件
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
ONBOOT=no
改为ONBOOT=yes
- 重启系统
设置静态IP
- 编辑IP配置文件
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
- 编辑如下配置
# 使用静态IP地址,默认为dhcp
BOOTPROTO="static"
# 设置的静态IP地址
IPADDR="192.168.0.100"
# 子网掩码
NETMASK="255.255.255.0"
# 网关地址
GATEWAY="192.168.0.1"
# DNS服务器(此设置没有用到,所以我的里面没有添加)
DNS1="8.8.8.8"
DNS2="114.114.114.114"
- 重启服务
$ systemctl restart network