wiki-files/centos/problems.md

931 B
Raw Blame History

title description published date tags editor dateCreated
常见问题 常见问题和处理方法 true 2021-08-05T08:58:32.044Z centos markdown 2021-08-05T08:58:32.044Z

新安装系统无法上网

  1. 确认网线已经插好
  2. 编辑IP配置文件
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
  1. ONBOOT=no 改为 ONBOOT=yes
  2. 重启系统

wx20210805-165432@2x.png

设置静态IP

  1. 编辑IP配置文件
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
  1. 编辑如下配置
# 使用静态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"
  1. 重启服务
$ systemctl restart network