当前位置: 首页 > news >正文

Linux920 RHEL 8 YUM配置;root密码;文件夹 磁盘分区 磁盘

问题

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
目录中的文件夹是磁盘分区的结果吗
在这里插入图片描述
什么是虚拟机磁盘 什么是虚拟机的磁盘分区
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
磁盘分区和文件夹,磁盘分区要求
在这里插入图片描述

在这里插入图片描述

[root@caozx26 yum.repos.d]# yum report list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: report。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(report)'"
[root@caozx26 yum.repos.d]# 

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

[root@caozx26 yum.repos.d]# uname rc.local local.repo
uname: 额外的操作数 “rc.local”
请尝试执行 "uname --help" 来获取更多信息。
[root@caozx26 yum.repos.d]# cat local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'AppStream':- Curl error (37): Couldn't read a file:// file for file:///mnt/repodata/repomd.xml [Couldn't open file /mnt/repodata/repomd.xml]
错误:Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# 

在这里插入图片描述

Rhel8 YUM配置

[root@caozx26 yum.repos.d]# tar -zcf repo.tar.gz *.repo
[root@caozx26 yum.repos.d]# ls
redhat.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# rm -rf *.repo
[root@caozx26 yum.repos.d]# yum report list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: report。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(report)'"
[root@caozx26 yum.repos.d]# yum report list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: report。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(report)'"
[root@caozx26 yum.repos.d]# yum reportlist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: reportlist。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(reportlist)'"
[root@caozx26 yum.repos.d]# yum repo list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: repo。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(repo)'"
[root@caozx26 yum.repos.d]# yum repolist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
没有可用的软件仓库
[root@caozx26 yum.repos.d]# ls
redhat.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# rm -rf redhat.repo 
[root@caozx26 yum.repos.d]# vim rc.local
[root@caozx26 yum.repos.d]# cat rc.local
[Appstream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# ls /mnt/
hgfs
[root@caozx26 yum.repos.d]# rm -f hgfs
[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@caozx26 yum.repos.d]# mount -o ro /dev/sr0 /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/root/RHEL-8-2-0-BaseOS-x86_64.
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# chmod +x /etc/rc.local
[root@caozx26 yum.repos.d]# echo "mount -o ro /dev/sr0 /mnt">>/etc/rc.local
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# uname rc.local local.repo
uname: 额外的操作数 “rc.local”
请尝试执行 "uname --help" 来获取更多信息。
[root@caozx26 yum.repos.d]# mv rc.local local.repo[root@caozx26 yum.repos.d]# 
[root@caozx26 yum.repos.d]# 
[root@caozx26 yum.repos.d]# ls
local.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# cat local.repo 
[Appstream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'Appstream':- Curl error (37): Couldn't read a file:// file for file:///mnt/repodata/repomd.xml [Couldn't open file /mnt/repodata/repomd.xml]
错误:Failed to download metadata for repo 'Appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@caozx26 yum.repos.d]# vim rc.local
[root@caozx26 yum.repos.d]# vim local.repo
[root@caozx26 yum.repos.d]# cat local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'AppStream':- Curl error (37): Couldn't read a file:// file for file:///mnt/repodata/repomd.xml [Couldn't open file /mnt/repodata/repomd.xml]
错误:Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# vim local.repo
[root@caozx26 yum.repos.d]# cat local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                         34 MB/s | 5.8 MB     00:00    
BaseOS                                                                                                            96 MB/s | 2.3 MB     00:00    
元数据缓存已建立。
[root@caozx26 yum.repos.d]# yum repolist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
仓库标识                                                              仓库名称                                                               状态
AppStream                                                             AppStream                                                              启用
BaseOS                                                                BaseOS                                                                 启用
[root@caozx26 yum.repos.d]# 

root密码

e
在这里插入图片描述
ctrl x

mount -o remount,rw /  # 确保根文件系统以读写方式挂载(如果未自动完成)
passwd root            # 重置root密码,输入新密码两次
touch /.autorelabel    # 如果系统使用SELinux(如CentOS),执行此命令避免权限问题
exec /sbin/reboot      # 重启系统

记录

[root@caozx26 ~]# ls
公共  视频  文档  音乐  anaconda-ks.cfg
模板  图片  下载  桌面  initial-setup-ks.cfg
[root@caozx26 ~]# ls ./
公共  视频  文档  音乐  anaconda-ks.cfg
模板  图片  下载  桌面  initial-setup-ks.cfg
[root@caozx26 ~]# ls /
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr
[root@caozx26 ~]# ls ~
公共  视频  文档  音乐  anaconda-ks.cfg
模板  图片  下载  桌面  initial-setup-ks.cfg
[root@caozx26 ~]# ls ^C
[root@caozx26 ~]# ls
公共  模板  视频  图片  文档  下载  音乐  桌面  anaconda-ks.cfg  initial-setup-ks.cfg
[root@caozx26 ~]# ls /^C
[root@caozx26 ~]# df -h
文件系统               容量  已用  可用 已用% 挂载点
devtmpfs               872M     0  872M    0% /dev
tmpfs                  901M     0  901M    0% /dev/shm
tmpfs                  901M  9.7M  891M    2% /run
tmpfs                  901M     0  901M    0% /sys/fs/cgroup
/dev/mapper/rhel-root   17G  4.2G   13G   26% /
/dev/nvme0n1p2        1014M  224M  791M   23% /boot
/dev/nvme0n1p1         599M  6.8M  593M    2% /boot/efi
tmpfs                  181M  1.2M  179M    1% /run/user/42
tmpfs                  181M  4.6M  176M    3% /run/user/0
[root@caozx26 ~]# du
4	./.cache/dconf
0	./.cache/libgweather
0	./.cache/evolution/addressbook/trash
0	./.cache/evolution/addressbook
0	./.cache/evolution/calendar/trash
0	./.cache/evolution/calendar
0	./.cache/evolution/mail/trash
0	./.cache/evolution/mail
0	./.cache/evolution/memos/trash
0	./.cache/evolution/memos
0	./.cache/evolution/sources/trash
0	./.cache/evolution/sources
0	./.cache/evolution/tasks/trash
0	./.cache/evolution/tasks
0	./.cache/evolution
0	./.cache/gnome-shell
7516	./.cache/tracker
552	./.cache/gstreamer-1.0
280	./.cache/gnome-software/fwupd/remotes.d/lvfs
280	./.cache/gnome-software/fwupd/remotes.d
280	./.cache/gnome-software/fwupd
0	./.cache/gnome-software/shell-extensions
0	./.cache/gnome-software/odrs
280	./.cache/gnome-software
0	./.cache/yelp/WebKitCache/Version 14/Blobs
4	./.cache/yelp/WebKitCache/Version 14
4	./.cache/yelp/WebKitCache
4	./.cache/yelp
8368	./.cache
4	./.dbus/session-bus
4	./.dbus
4	./.config/ibus/bus
4	./.config/ibus
68	./.config/pulse
0	./.config/gnome-session/saved-session
0	./.config/gnome-session
4	./.config/dconf
4	./.config/evolution/sources
4	./.config/evolution
0	./.config/goa-1.0
0	./.config/gconf
4	./.config/gtk-3.0
4	./.config/yelp
100	./.config
4	./.local/share/gnome-shell
0	./.local/share/evolution/addressbook/trash
0	./.local/share/evolution/addressbook/system/photos
84	./.local/share/evolution/addressbook/system
84	./.local/share/evolution/addressbook
0	./.local/share/evolution/calendar/trash
4	./.local/share/evolution/calendar/system
4	./.local/share/evolution/calendar
0	./.local/share/evolution/mail/trash
0	./.local/share/evolution/mail
0	./.local/share/evolution/memos/trash
0	./.local/share/evolution/memos
0	./.local/share/evolution/tasks/trash
0	./.local/share/evolution/tasks
88	./.local/share/evolution
0	./.local/share/sounds
0	./.local/share/applications
0	./.local/share/icc
0	./.local/share/flatpak/db
0	./.local/share/flatpak/repo/tmp/cache
0	./.local/share/flatpak/repo/tmp
0	./.local/share/flatpak/repo/extensions
0	./.local/share/flatpak/repo/state
0	./.local/share/flatpak/repo/refs/heads
0	./.local/share/flatpak/repo/refs/mirrors
0	./.local/share/flatpak/repo/refs/remotes
0	./.local/share/flatpak/repo/refs
0	./.local/share/flatpak/repo/objects
4	./.local/share/flatpak/repo
4	./.local/share/flatpak
0	./.local/share/gnome-settings-daemon
72	./.local/share/gvfs-metadata
152	./.local/share/tracker/data
152	./.local/share/tracker
0	./.local/share/webkitgtk/localstorage
0	./.local/share/webkitgtk/deviceidhashsalts/1
0	./.local/share/webkitgtk/deviceidhashsalts
0	./.local/share/webkitgtk/databases/indexeddb
0	./.local/share/webkitgtk/databases
0	./.local/share/webkitgtk
324	./.local/share
324	./.local
0	./桌面
0	./下载
0	./模板
0	./公共
0	./文档
0	./音乐
0	./图片
0	./视频
0	./.pki/nssdb
0	./.pki
8836	.
[root@caozx26 ~]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1 1024M  0 rom  
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 ~]# cd /
[root@caozx26 /]# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[root@caozx26 /]# cd /etc/yum.repos.d
[root@caozx26 yum.repos.d]# ls
redhat.repo
[root@caozx26 yum.repos.d]# tar -zcf repo.tar.gz *.repo
[root@caozx26 yum.repos.d]# ls
redhat.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# rm -rf *.repo
[root@caozx26 yum.repos.d]# yum report list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: report。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(report)'"
[root@caozx26 yum.repos.d]# yum report list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: report。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(report)'"
[root@caozx26 yum.repos.d]# yum reportlist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: reportlist。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(reportlist)'"
[root@caozx26 yum.repos.d]# yum repo list
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
未找到命令: repo。请使用 /usr/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(repo)'"
[root@caozx26 yum.repos.d]# yum repolist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
没有可用的软件仓库
[root@caozx26 yum.repos.d]# ls
redhat.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# rm -rf redhat.repo 
[root@caozx26 yum.repos.d]# vim rc.local
[root@caozx26 yum.repos.d]# cat rc.local
[Appstream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# ls /mnt/
hgfs
[root@caozx26 yum.repos.d]# rm -f hgfs
[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@caozx26 yum.repos.d]# mount -o ro /dev/sr0 /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/root/RHEL-8-2-0-BaseOS-x86_64.
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# chmod +x /etc/rc.local
[root@caozx26 yum.repos.d]# echo "mount -o ro /dev/sr0 /mnt">>/etc/rc.local
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# ls
rc.local  repo.tar.gz
[root@caozx26 yum.repos.d]# uname rc.local local.repo
uname: 额外的操作数 “rc.local”
请尝试执行 "uname --help" 来获取更多信息。
[root@caozx26 yum.repos.d]# mv rc.local local.repo[root@caozx26 yum.repos.d]# 
[root@caozx26 yum.repos.d]# 
[root@caozx26 yum.repos.d]# ls
local.repo  repo.tar.gz
[root@caozx26 yum.repos.d]# cat local.repo 
[Appstream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'Appstream':- Curl error (37): Couldn't read a file:// file for file:///mnt/repodata/repomd.xml [Couldn't open file /mnt/repodata/repomd.xml]
错误:Failed to download metadata for repo 'Appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@caozx26 yum.repos.d]# vim rc.local
[root@caozx26 yum.repos.d]# vim local.repo
[root@caozx26 yum.repos.d]# cat local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                        0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'AppStream':- Curl error (37): Couldn't read a file:// file for file:///mnt/repodata/repomd.xml [Couldn't open file /mnt/repodata/repomd.xml]
错误:Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@caozx26 yum.repos.d]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0            11:0    1  7.9G  0 rom  /mnt
nvme0n1       259:0    0   20G  0 disk 
├─nvme0n1p1   259:1    0  600M  0 part /boot/efi
├─nvme0n1p2   259:2    0    1G  0 part /boot
└─nvme0n1p3   259:3    0 18.4G  0 part ├─rhel-root 253:0    0 16.4G  0 lvm  /└─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
[root@caozx26 yum.repos.d]# vim local.repo
[root@caozx26 yum.repos.d]# cat local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
enabled=1[root@caozx26 yum.repos.d]# yum clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
[root@caozx26 yum.repos.d]# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                         34 MB/s | 5.8 MB     00:00    
BaseOS                                                                                                            96 MB/s | 2.3 MB     00:00    
元数据缓存已建立。
[root@caozx26 yum.repos.d]# yum repolist all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
仓库标识                                                              仓库名称                                                               状态
AppStream                                                             AppStream                                                              启用
BaseOS                                                                BaseOS                                                                 启用
[root@caozx26 yum.repos.d]# 
http://www.dtcms.com/a/392451.html

相关文章:

  • yarn命令介绍(替代npm命令的JavaScript包管理工具)
  • MFC中开源布局库---ResizableLib
  • Scade 6 编译原理的参考实现 - LustreC
  • MFC List 控件详解:高效数据展示与管理
  • 从根到叶的二进制数之和(霍纳法则)
  • 隐私与合规内建:Python医疗AI编程中的SBOM、依赖监测与威胁建模实践分析(上)
  • 基于实战:如何高效调用陌讯AIGC检测RESTful API进行批量内容审核
  • 如何用kimi写一个最小excel软件
  • Ansible-script模块
  • ansible批量给网络设备下发配置
  • 使用 Bright Data Web Scraper API Python 高效抓取 Glassd
  • uni-app 用scroll-view实现横向滚动
  • Kafka 图形界面客户端工具
  • 【开题答辩全过程】以 Php产品报价系统的设计与实现为例,包含答辩的问题和答案
  • 软件测试基础知识(网络协议)
  • 手机中的轻量化 AI 算法:智能生活的幕后英雄
  • wo店模式兴起旧模式式微:本地生活服务市场的深度变革
  • 服务器磁盘空间满了怎么办?阿里云ECS清理与云盘扩容教程
  • OpenAI推出更擅长AI代理编码的GPT-5-Codex,与Claude code有何区别?国内怎么使用到Codex呢?
  • GPT-5 深度测试报告:前端编程能力专项评估
  • AIGC发展:从GPT-1到GPT-4的技术演进与行业革新
  • 从AI生成到学术表达:如何有效降低AI率,实现论文合规化写作
  • 【国二】C语言选择题精华速记
  • 聊聊和AutoDL的故事
  • 【状态机实现】前置——设计模式中的孪生兄弟(状态模式和策略模式)
  • 【LeetCode - 每日1题】设计路由器
  • springboot宠物领养救助平台的开发与设计(代码+数据库+LW)
  • CSS的三大特性
  • 实现excel的树形导出
  • 基于Matlab的GPS/北斗系统抗脉冲与窄带干扰算法研究及仿真验证