docs: create centos/problems
This commit is contained in:
parent
51bdc0645d
commit
3478ce96d9
50
centos/problems.md
Normal file
50
centos/problems.md
Normal file
@ -0,0 +1,50 @@
|
||||
---
|
||||
title: 常见问题
|
||||
description: 常见问题和处理方法
|
||||
published: true
|
||||
date: 2021-08-05T08:58:32.044Z
|
||||
tags: centos
|
||||
editor: markdown
|
||||
dateCreated: 2021-08-05T08:58:32.044Z
|
||||
---
|
||||
|
||||
# 新安装系统无法上网
|
||||
1. 确认网线已经插好
|
||||
2. 编辑IP配置文件
|
||||
|
||||
```bash
|
||||
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
|
||||
```
|
||||
|
||||
3. `ONBOOT=no` 改为 `ONBOOT=yes`
|
||||
4. 重启系统
|
||||
|
||||

|
||||
|
||||
# 设置静态IP
|
||||
1. 编辑IP配置文件
|
||||
|
||||
```bash
|
||||
$ vim /etc/sysconfig/network-scripts/ifcfg-ens33
|
||||
```
|
||||
|
||||
2. 编辑如下配置
|
||||
|
||||
```vim
|
||||
# 使用静态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"
|
||||
```
|
||||
|
||||
3. 重启服务
|
||||
```bash
|
||||
$ systemctl restart network
|
||||
```
|
Loading…
Reference in New Issue
Block a user