干货|怎么安装Linux操作系统并配置网络?
Linux 是一套免费使用和自由传播的类 Unix 操作系统,是一个基于 POSIX 和 UNIX 的多用户、多任务、支持多线程和多 CPU 的操作系统。Linux 能运行主要的 UNIX 工具软件、应用程序和网络协议。它支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。下面就让我们为大家带来详细的安装步骤吧!

PART 01
安装操作系统的几种方法
1.通过光盘安装:

2.通过U盘安装:

3.通过BMC管理口进行安装(服务器需要有管理口):

PART 02
通过U盘安装的步骤
准备工作:
- 制作下载U盘启动工具如win PE、ventoy 等:
- 这里使用ventoy工具,下载链接:https://mirrors.nju.edu.cn/github-release/ventoy/Ventoy/Ventoy%201.0.88%20release/ventoy-1.0.88-windows.zip
- 下载后解压:

4.打开Ventoy2Disk.exe

5.选择安装(备份好U盘数据,会被格式化)

Windows系统下载网址:https://msdn.itellyou.cn/
Linux 系统下载网址:
https://www.centos.org/download/
6.将操作系统.iso文件复制到U盘内

PART 03
开始安装Linux服务器
1.插入系统U盘(光盘)服务器或电脑上:

2.重启电脑在开机过程中根据提示选择引导项boot (一般为服务器的DEL、F2、F10 等):

3.选择USB--U盘启动:

4.选择cent os操作系统:

5.进入安装系统画面,直接下一步:

6.选择想要在 CentOS 8 安装过程中使用的语言,然后继续:

7.选择磁盘图标进行磁盘分区:

方法一:磁盘默认分区安装(/home 空间最大)

方法二:如果有安装磁盘空间要求也可以选择 custom 自定义分区

分区完成后磁盘的黄色会消失。

安装过程中如知道IP地址,建议在安装过程中配置IP地址,选择network host:

选择configure......

IPV4 设置完成后 网卡开关选择“ON”点击Done
IP地址配置完成后可以然后选择安装版本 Software selection

(常用选项) 第一个 是server with gui 安装图形界面:

(常用选项) MINimal install 最小化安装
如无要求选择最小化安装即可,右侧扩展包均不勾选,点击左上角 Done

设置完成后进入主菜单。点击右下角 Begin Installation 进行下一步:

服务器进行安装,可在安装过程中设置服务器密码及创建普通用户:

安装完成后会提示reboot 重启,这样linux 就安装成功了!
PART 04
配置IP地址
提示:(IP尽量安装系统的时候直接配置好,不然后期修改IP会稍微麻烦些)
1、使用root账户进入网络配置文件夹 (需要掌握VI 编辑器基础使用方法)
cd /etc/sysconfig/network-scripts/

2、修改网络配置文件:ifcfg-ens33(网卡名字一般为ifcfg-XXX)
vi ifcfg-ens33
修改的参数如下
IPADDR=192.168.1.88 #静态IP
GATEWAY=192.168.1.1 #默认网关
DNS1=192.168.1.1 #DNS 配置

修改完成之后保存并退出。
3、重新加载网络配置文件
nmcli c reload ens33
4、重启网卡
nmcli c up ens33
5、ssh连接,并使用命令查看ip
ip add |more
