Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

[root@localhost etc]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS


sda 8:0 0 8G 0 disk
sdb 8:16 0 8G 0 disk
├─sdb1 8:17 0 600M 0 part /boot/efi
├─sdb2 8:18 0 1G 0 part /boot
└─sdb3 8:19 0 6.4G 0 part
├─rhel-root 253:0 0 5.6G 0 lvm /
└─rhel-swap 253:1 0 820M 0 lvm [SWAP]
sr0 11:0 1 9.8G 0 rom
[root@localhost etc]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs 729M 8.8M 720M 2% /run
/dev/mapper/rhel-root 5.6G 1.3G 4.4G 23% /
/dev/sdb2 960M 216M 745M 23% /boot
/dev/sdb1 599M 7.0M 592M 2% /boot/efi
tmpfs 365M 0 365M 0% /run/user/0
[root@localhost etc]# mkdir /iso
[root@localhost etc]# mount /dev/sr0 /iso/
mount: /iso: WARNING: source write-protected, mounted read-only.
[root@localhost etc]# cd /iso/
[root@localhost iso]# ls
AppStream EFI extra_files.json images media.repo RPM-GPG-KEY-
redhat-release
BaseOS EULA GPL isolinux RPM-GPG-KEY-redhat-beta
[root@localhost iso]# cd /etc/
[root@localhost etc]# cd yum
[root@localhost yum]# ls
pluginconf.d protected.d vars
[root@localhost yum]# cd ../
[root@localhost etc]# cat re
redhat-release resolv.conf
[root@localhost etc]# cat yum
yum/ yum.conf yum.repos.d/
[root@localhost etc]# cat yum.repos.d/
cat: yum.repos.d/: Is a directory
[root@localhost etc]# cd yum.repos.d/
[root@localhost yum.repos.d]# ls
redhat.repo
[root@localhost yum.repos.d]# cat redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes.
***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[root@localhost yum.repos.d]# vi iso.repo
[root@localhost yum.repos.d]# cat iso.repo
[AppStream]
name=AppStream
baseurl=file:///iso/AppStream
[BaseOS]
name=BaseOS
baseurl=file:///iso/BaseOS

[root@localhost yum.repos.d]# cd /iso/


[root@localhost iso]# ls
AppStream EFI extra_files.json images media.repo RPM-GPG-KEY-
redhat-release
BaseOS EULA GPL isolinux RPM-GPG-KEY-redhat-beta
[root@localhost iso]# yum install bash-completion
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-
manager to register.

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key

Alternatively you can specify the url to the key you would like to use
for a repository in the 'gpgkey' option in a repository section and YUM
will install it for you.

For more information contact your distribution or package provider.

Problem repository: [AppStream]


bandwidth: 0
baseurl: file:///iso/AppStream
cachedir: /var/cache/dnf
cost: 1000
countme: 0
deltarpm: 1
deltarpm_percentage: 75
enabled: 1
enabled_metadata:
enablegroups: 1
exclude:
excludepkgs:
fastestmirror: 0
gpgcheck: 1
gpgkey:
includepkgs:
ip_resolve: whatever
max_downloads_per_mirror: 3
max_parallel_downloads: 3
mediaid:
metadata_expire: 172800
metalink:
minrate: 1000
mirrorlist:
module_hotfixes: 0
name: AppStream
password:
priority: 99
protected_packages: dnf, dnf, redhat-release, setup, systemd, systemd-udev, grub2-
tools-minimal, yum, grub2-efi-x64, sudo, dnf, redhat-release, setup, systemd,
systemd-udev, grub2-tools-minimal, yum, grub2-efi-x64, sudo
proxy:
proxy_auth_method: any
proxy_password:
proxy_sslcacert:
proxy_sslclientcert:
proxy_sslclientkey:
proxy_sslverify: 1
proxy_username:
repo_gpgcheck: 0
retries: 10
skip_if_unavailable: 0
sslcacert:
sslclientcert:
sslclientkey:
sslverify: 1
sslverifystatus: 0
throttle: 0
timeout: 30
type:
user_agent: libdnf (Red Hat Enterprise Linux 9.3; generic; Linux.x86_64)
username:
[root@localhost iso]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi iso.repo
[root@localhost yum.repos.d]# yum install bash-completion
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-
manager to register.

AppStream
22 MB/s | 6.5 MB 00:00
BaseOS
11 MB/s | 2.0 MB 00:00
Dependencies resolved.
===================================================================================
===========================================
Package Architecture Version
Repository Size
===================================================================================
===========================================
Installing:
bash-completion noarch 1:2.11-4.el9
BaseOS 459 k
Installing dependencies:
libpkgconf x86_64 1.7.3-10.el9
BaseOS 37 k
pkgconf x86_64 1.7.3-10.el9
BaseOS 45 k
pkgconf-m4 noarch 1.7.3-10.el9
BaseOS 16 k
pkgconf-pkg-config x86_64 1.7.3-10.el9
BaseOS 12 k

Transaction Summary
===================================================================================
===========================================
Install 5 Packages

Total size: 569 k


Installed size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing :
1/1
Installing : pkgconf-m4-1.7.3-10.el9.noarch
1/5
Installing : libpkgconf-1.7.3-10.el9.x86_64
2/5
Installing : pkgconf-1.7.3-10.el9.x86_64
3/5
Installing : pkgconf-pkg-config-1.7.3-10.el9.x86_64
4/5
Installing : bash-completion-1:2.11-4.el9.noarch
5/5
Running scriptlet: bash-completion-1:2.11-4.el9.noarch
5/5
Verifying : bash-completion-1:2.11-4.el9.noarch
1/5
Verifying : libpkgconf-1.7.3-10.el9.x86_64
2/5
Verifying : pkgconf-1.7.3-10.el9.x86_64
3/5
Verifying : pkgconf-m4-1.7.3-10.el9.noarch
4/5
Verifying : pkgconf-pkg-config-1.7.3-10.el9.x86_64
5/5
Installed products updated.

Installed:
bash-completion-1:2.11-4.el9.noarch libpkgconf-1.7.3-10.el9.x86_64
pkgconf-1.7.3-10.el9.x86_64
pkgconf-m4-1.7.3-10.el9.noarch pkgconf-pkg-config-1.7.3-10.el9.x86_64

Complete!
[root@localhost yum.repos.d]# reboot
[root@localhost yum.repos.d]#
Remote side unexpectedly closed network connection

───────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────

Session stopped
- Press <Return> to exit tab
- Press R to restart session
- Press S to save terminal output to file

Network error: Connection timed out

───────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────

Session stopped
- Press <Return> to exit tab
- Press R to restart session
- Press S to save terminal output to file
┌──────────────────────────────────────────────────────────────────────┐
│ • MobaXterm Personal Edition v23.6 • │
│ (SSH client, X server and network tools) │
│ │
│ ⮞ SSH session to root@192.168.0.231 │
│ • Direct SSH : ✓ │
│ • SSH compression : ✓ │
│ • SSH-browser : ✓ │
│ • X11-forwarding : ✗ (disabled or not supported by server) │
│ │
│ ⮞ For more info, ctrl+click on help or visit our website. │
└──────────────────────────────────────────────────────────────────────┘

Register this system with Red Hat Insights: insights-client --register


Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Sun Feb 25 08:55:58 2024 from 10.213.16.8
[root@localhost ~]# yum in
info install
[root@localhost ~]# yum in
info install
[root@localhost ~]# yum in
info install
[root@localhost ~]# cat /etc/yum.repos.d/iso.repo
[AppStream]
name=AppStream
baseurl=file:///iso/AppStream
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=file:///iso/BaseOS
gpgcheck=0

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs 729M 8.8M 720M 2% /run
/dev/mapper/rhel-root 5.6G 1.3G 4.3G 23% /
/dev/sda2 960M 216M 745M 23% /boot
/dev/sda1 599M 7.0M 592M 2% /boot/efi
tmpfs 365M 0 365M 0% /run/user/0
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 8G 0 disk
├─sda1 8:1 0 600M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 6.4G 0 part
├─rhel-root 253:0 0 5.6G 0 lvm /
└─rhel-swap 253:1 0 820M 0 lvm [SWAP]
sdb 8:16 0 8G 0 disk
sr0 11:0 1 9.8G 0 rom
[root@localhost ~]# vi /etc/fstab
[root@localhost ~]# vi /etc/fstab
[root@localhost ~]# mount -a
mount: /iso: wrong fs type, bad option, bad superblock on /dev/sr0, missing
codepage or helper program, or other error.
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[root@localhost ~]# vi /etc/fstab
[root@localhost ~]# mount -a
mount: /iso: WARNING: source write-protected, mounted read-only.
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs 729M 8.8M 720M 2% /run
/dev/mapper/rhel-root 5.6G 1.3G 4.3G 23% /
/dev/sda2 960M 216M 745M 23% /boot
/dev/sda1 599M 7.0M 592M 2% /boot/efi
tmpfs 365M 0 365M 0% /run/user/0
/dev/sr0 9.9G 9.9G 0 100% /iso
[root@localhost ~]# vim
-bash: vim: command not found
[root@localhost ~]# yum install vim
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-
manager to register.

Last metadata expiration check: 0:10:21 ago on Sun 25 Feb 2024 02:09:29 PM CET.
Dependencies resolved.
===================================================================================
===========================================
Package Architecture Version
Repository Size
===================================================================================
===========================================
Installing:
vim-enhanced x86_64 2:8.2.2637-20.el9_1
AppStream 1.8 M
Installing dependencies:
gpm-libs x86_64 1.20.7-29.el9
AppStream 22 k
vim-common x86_64 2:8.2.2637-20.el9_1
AppStream 7.0 M
vim-filesystem noarch 2:8.2.2637-20.el9_1
BaseOS 22 k

Transaction Summary
===================================================================================
===========================================
Install 4 Packages

Total size: 8.8 M


Installed size: 34 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing :
1/1
Installing : vim-filesystem-2:8.2.2637-20.el9_1.noarch
1/4
Installing : vim-common-2:8.2.2637-20.el9_1.x86_64
2/4
Installing : gpm-libs-1.20.7-29.el9.x86_64
3/4
Installing : vim-enhanced-2:8.2.2637-20.el9_1.x86_64
4/4
Running scriptlet: vim-enhanced-2:8.2.2637-20.el9_1.x86_64
4/4
Verifying : gpm-libs-1.20.7-29.el9.x86_64
1/4
Verifying : vim-common-2:8.2.2637-20.el9_1.x86_64
2/4
Verifying : vim-enhanced-2:8.2.2637-20.el9_1.x86_64
3/4
Verifying : vim-filesystem-2:8.2.2637-20.el9_1.noarch
4/4
Installed products updated.

Installed:
gpm-libs-1.20.7-29.el9.x86_64 vim-common-2:8.2.2637-20.el9_1.x86_64
vim-enhanced-2:8.2.2637-20.el9_1.x86_64
vim-filesystem-2:8.2.2637-20.el9_1.noarch

Complete!
[root@localhost ~]# yum search
check-update groupinfo groupupdate list provides search
whatprovides
clean groupinstall help localinstall remove shell
deplist grouplist info localupdate repolist update
erase groupremove install makecache resolvedep upgrade
[root@localhost ~]# yum whatprovides vim
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-
manager to register.

Last metadata expiration check: 0:10:57 ago on Sun 25 Feb 2024 02:09:29 PM CET.
vim-enhanced-2:8.2.2637-20.el9_1.x86_64 : A version of the VIM editor which
includes recent enhancements
Repo : @System
Matched from:
Provide : vim

vim-enhanced-2:8.2.2637-20.el9_1.x86_64 : A version of the VIM editor which


includes recent enhancements
Repo : AppStream
Matched from:
Provide : vim

[root@localhost ~]# yum install vim-enhanced-2:8.2.2637-20.el9_1.x86_64


Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-
manager to register.

Last metadata expiration check: 0:11:19 ago on Sun 25 Feb 2024 02:09:29 PM CET.
Package vim-enhanced-2:8.2.2637-20.el9_1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

You might also like