红帽练习环境介绍

一、练习环境拓扑图

备注:

所有学员计算机系统都有一个标准用户帐户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 ~]$ 
相关推荐
A小辣椒2 天前
TShark:Wireshark CLI 功能
linux
A小辣椒2 天前
TShark:基础知识
linux
AlfredZhao2 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao2 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334663 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux
猪脚踏浪3 天前
linux 拷贝文件或目录到指定的位置
linux
摇滚侠3 天前
Linux CentOS7 rpm 安装 MySQL 5.7
linux·运维·mysql
LDR0063 天前
Type-C 快充全面升级!LDR6601 赋能个人护理便携电机,重塑剃须刀 / 理发器新体验
c语言·开发语言
雪碧聊技术3 天前
Tree.js是什么?一文讲透
开发语言·javascript·ecmascript
码云数智-园园3 天前
C++20 Modules 模块详解
java·开发语言·spring