温馨提示×

centos stream8新手如何入门

小樊
44
2026-09-08 22:40:39
栏目: 智能运维

CentOS Stream 8 是 Red Hat 推出的滚动预览版发行版(介于 Fedora 和 RHEL 之间),适合想提前体验新特性、又需要一定稳定性的用户。下面从概念 → 安装 → 基础命令 → 软件管理 → 网络/服务 → 学习资源给你一个新手入门路线。


一、先搞清楚:CentOS Stream 8 是什么?

  • 不是传统 CentOS Linux(那个已停止维护)
  • ✅ 是 RHEL 的上游开发版
  • ✅ 包比 RHEL 新,但比 Fedora 稳
  • ❌ 不适合纯生产关键系统(新手练手、测试环境很合适)

二、安装 CentOS Stream 8(新手推荐方式)

1️⃣ 准备

  • 镜像:https://mirror.stream.centos.org
  • 工具:Ventoy / Rufus(U盘)
  • 或直接使用 虚拟机(VMware / VirtualBox)

2️⃣ 安装建议

  • 分区:自动分区即可
  • 软件选择:
    • 新手选 Server with GUI
    • 想学服务器选 Minimal Install
  • 设置 root 密码 + 普通用户(一定要建)

三、第一次登录后必须做的事

1️⃣ 更新系统

sudo dnf update -y

2️⃣ 安装常用工具

sudo dnf install -y vim wget curl net-tools bash-completion

四、软件管理(重点)

CentOS Stream 使用 dnf(新一代 yum)

常用命令

dnf search 软件名
dnf install 软件名
dnf remove 软件名
dnf list installed

启用 EPEL 源(非常推荐)

sudo dnf install epel-release -y

五、用户与权限

adduser test
passwd test
usermod -aG wheel test   # 给 sudo 权限

切换用户:

su - test

六、网络基础

查看 IP:

ip addr

测试网络:

ping baidu.com

防火墙(很重要):

systemctl status firewalld
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --reload

七、服务管理(systemd)

systemctl start nginx
systemctl enable nginx
systemctl status nginx

八、新手练手项目(由易到难)

  1. 搭建 nginx 静态网站
  2. 配置 SSH 密钥登录
  3. 搭建 LAMP / LNMP
  4. 写定时任务(cron)
  5. 学习 SELinux 基础

九、常见坑提醒

  • ❌ 不要随便关 SELinux(先学怎么配置)
  • ❌ 不要混用 yum 和 dnf(用 dnf 就行)
  • ❌ 不要用 root 日常操作

十、学习资源推荐

  • 官方文档:https://docs.centos.org
  • 中文:鸟哥的 Linux 私房菜
  • 命令练习:https://linuxjourney.com
  • B 站搜索:CentOS Stream 入门

如果你愿意,可以告诉我:

  • 你是 纯新手 / 有 Windows 基础 / 有 Linux 基础
  • 想用来做什么(建站 / 运维 / 开发 / 考试)

我可以给你定制学习路线 + 命令清单

0