红帽练习环境介绍

一、练习环境拓扑图

备注:

所有学员计算机系统都有一个标准用户帐户student , 其密码为student 。 所有学员系统的root 密码都是 redhat

二、操作练习环境具体命令

清空课程环境

sql 复制代码
[kiosk@foundation0 ~]$ rht-clearcourse 0
Preparing to remove VMs on foundation0.ilt.example.com...
Using sudo to become root.
Using sudo to become root.
Powering off classroom..
Removing classroom.
Powering off bastion.
Removing bastion.
Powering off workstation.
Removing workstation.
Powering off utility.
Removing utility.
Powering off servera.
Removing servera.
Powering off serverb.
Removing serverb.
Warning: Permanently added 'foundation0.ilt.example.com,fe80::5114:c881:fa5b:2ae%ens192' (ECDSA) to the list of known hosts.
VMs removed from foundation0.ilt.example.com.
[kiosk@foundation0 ~]$ 

查看所有的课程环境镜像

sql 复制代码
[kiosk@foundation0 ~]$ ll -h /content/manifests/
total 28K
-rwxrwxr-x. 1 root root 5.1K Oct  2  2020 RH124-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf_quiesced
-rwxrwxr-x. 1 root root 5.1K Oct  3  2020 RH134-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf
-rwxrwxr-x. 1 root root 5.1K Oct  3  2020 RH294-RHEL8.0-1.r2019062609-ILT+RAV-7-en_US.icmf_quiesced
-rwxrwxr-x. 1 root root 3.3K Nov 15  2020 RHCIfoundation-RHEL80-7.r2020092412-ILT-7-en_US.icmf
[kiosk@foundation0 ~]$ 

切换课程环境

sql 复制代码
[kiosk@foundation0 ~]$ rht-setcourse rh124
ls: cannot access '/content/manifests/RH124-*.icmf': No such file or directory
INFO     Configuration file: /home/kiosk/.icrm/config.yml
INFO     Enabling on f0: RH124-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf_quiesced
INFO     Quiescing on f0: RH134-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf
INFO     Keeping: RHCIfoundation-RHEL80-7.r2020092412-ILT-7-en_US.icmf
INFO     Quiescing on f0: RH134-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf
INFO     Uninstalling redhat-training-slides-RH134-RHEL8.2-en-1-20200928.noarch.rpm
INFO     Activating on f0: RH124-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf_quiesced
INFO     Mounting /content/rhel8.2/x86_64/isos/rhel-8.2-x86_64-dvd.iso to /content/rhel8.2/x86_64/dvd
INFO     Mounting /content/rhel8.2/x86_64/extraisos/rhel-8.2-x86_64-additional-20200813.iso to /content/rhel8.2/x86_64/rhel8-additional
INFO     Mounting /content/rhel8.2/x86_64/extraisos/rhcsa-practice-20190306.iso to /content/rhel8.2/x86_64/rhcsa-practice
INFO     Installing /content/ucf/Packages/foundation0-rhcsa-8.2-1.r2020100106giteaab22d.noarch.rpm
INFO     Installing /content/ucf/Packages/redhat-training-slides-RH124-RHEL8.2-en-1-20200928.noarch.rpm
INFO     Renaming manifest RH124-RHEL8.2-1.r2020100106-ILT+RAV-7-en_US.icmf_quiesced
INFO     f0activate completed.
/content/rhel8.2/x86_64/vms /home/kiosk
/home/kiosk
Course set to rh124
[kiosk@foundation0 ~]$ 

查看环境中所有机器的状态

sql 复制代码
[kiosk@foundation0 ~]$ rht-vmctl status all
bastion MISSING
workstation MISSING
utility MISSING
servera MISSING
serverb MISSING
[kiosk@foundation0 ~]$ 

开启、查看、重置某个机器的状态

sql 复制代码
[kiosk@foundation0 ~]$ rht-vmctl start classroom
Starting classroom.
[kiosk@foundation0 ~]$ rht-vmctl status classroom
classroom RUNNING
[kiosk@foundation0 ~]$ rht-vmctl reset classroom
Are you sure you want to reset classroom? (y/n) y
Powering off classroom..
Resetting classroom.
Creating virtual machine disk overlay for rh124-classroom-vda.qcow2
Starting classroom.
[kiosk@foundation0 ~]$ 

开启环境中所有机器

sql 复制代码
[kiosk@foundation0 ~]$ rht-vmctl start all
Starting bastion.
Starting workstation.
Downloading virtual machine definition file for utility.
############################################################################################################################################################### 100.0%
Downloading virtual machine disk image rh124-utility-vda.qcow2
############################################################################################################################################################### 100.0%
Creating virtual machine disk overlay for rh124-utility-vda.qcow2
Starting utility.
Starting servera.
Starting serverb.
[kiosk@foundation0 ~]$ 

再次查看环境中所有机器状态

sql 复制代码
[kiosk@foundation0 ~]$ rht-vmctl status all
bastion RUNNING
workstation RUNNING
utility RUNNING
servera RUNNING
serverb RUNNING
[kiosk@foundation0 ~]$

三、练习环境登录验证

sql 复制代码
[kiosk@foundation0 ~]$ ssh root@servera
Warning: Permanently added 'servera,172.25.250.10' (ECDSA) to the list of known hosts.
Web console: https://servera.lab.example.com:9090/ or https://172.25.250.10:9090/

This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register

Last login: Wed Jun 11 18:48:38 2025
[root@servera ~]# 
[root@servera ~]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@servera ~]# 
[root@servera ~]# exit
logout
Connection to servera closed.
[kiosk@foundation0 ~]$ 
[kiosk@foundation0 ~]$ ssh student@servera
Web console: https://servera.lab.example.com:9090/ or https://172.25.250.10:9090/

This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register

Last login: Thu Jun 12 00:46:17 2025 from 172.25.250.9
[student@servera ~]$ 
[student@servera ~]$ id
uid=1000(student) gid=1000(student) groups=1000(student),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[student@servera ~]$ 
相关推荐
松☆2 分钟前
Dart 核心语法精讲:从空安全到流程控制(3)
android·java·开发语言
编码者卢布23 分钟前
【App Service】Java应用上传文件功能部署在App Service Windows上报错 413 Payload Too Large
java·开发语言·windows
kaikaile199524 分钟前
结构风荷载理论与Matlab计算
开发语言·matlab
Kira Skyler26 分钟前
eBPF debugfs中的追踪点format实现原理
linux
切糕师学AI33 分钟前
ARM 汇编器中的伪指令(Assembler Directives)
开发语言·arm开发·c#
吕司1 小时前
Qt的信号与槽
开发语言·qt
2501_927773071 小时前
uboot挂载
linux·运维·服务器
wdfk_prog2 小时前
[Linux]学习笔记系列 -- [drivers][dma]dmapool
linux·笔记·学习
bjxiaxueliang2 小时前
一文掌握C/C++命名规范:风格、规则与实践详解
c语言·开发语言·c++
玄〤2 小时前
Java 大数据量输入输出优化方案详解:从 Scanner 到手写快读(含漫画解析)
java·开发语言·笔记·算法