2024-05-09 16:35:20 +08:00
|
|
|
|
---
|
|
|
|
|
layout: post
|
|
|
|
|
cid: 374
|
|
|
|
|
title: centos7安装后没有网络
|
|
|
|
|
slug: there-is-no-network-after-centos7-installation
|
|
|
|
|
date: 2022/11/29 09:56:00
|
|
|
|
|
updated: 2022/11/29 09:57:00
|
|
|
|
|
status: publish
|
|
|
|
|
author: 老孙
|
|
|
|
|
categories: 分享
|
|
|
|
|
tags:
|
|
|
|
|
- centos
|
|
|
|
|
abbrlink: 6609
|
|
|
|
|
excerpt: >-
|
|
|
|
|
ai: 这篇文章介绍了如何通过root账号登录服务器,使用ip
|
|
|
|
|
addr命令查看网络参数,并编辑eth0网卡的配置文件将NOBOOT参数从no修改为yes后,重启网络或服务器以应用更改。
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
以`root`账号登陆
|
|
|
|
|
用`ip addr`命令查看网络参数。
|
|
|
|
|
打开`eth0`网卡的配置文件
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
vi /etc/sysconfig/network-scripts/ifcfg-eth0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
把`NOBOOT`参数`no`,修改为`yes`
|
2023-09-25 15:58:56 +08:00
|
|
|
|
重启网络或者重启服务器都可
|