[步骤] Red Hat Satellite 必须软件包版本的查看

正文:

Red Hat Satellite 通常使用指定版本的软件。所以在安装或升级 Red Hat Satellite 时,我们需要设置 Red Hat Satellite 的模块流,在设置模块流以后,相应的软件就被锁定制在对应版本无法升级了。

我们可以通过查看 Red Hat Satellite 的模块流,确认有哪些软件被锁定在了哪些版本里

步骤一:

# dnf module enable satellite

或者:

# dnf module enable satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里设置 el8 版本的 Red Hat Satellite 模块流为例)

步骤二:

# dnf module info

或者:

# dnf module info satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里查看 el8 版本的 Red Hat Satellite 模块流为例)

参考文献:

https://docs.redhat.com/en/documentation/red_hat_satellite/6.15/html/installing_satellite_server_in_a_connected_network_environment/installing_server_connected_satellite#configuring-repositories_satellite

[STEP] Linux Audit Log join /var/log/message

Main Content:

Step One: Modify /audit/plugins.d/syslog.conf file

# vim /audit/plugins.d/syslog.conf

Modify part content as follow:

Modify part content as follow:
......
active = no
......

Step Two: Restart auditd Service

# service auditd restart

Reference:

https://access.redhat.com/solutions/637863

[DEBUG] Linux resolve df command is stuck

Error phenomenon:

Input df command and the command is stuck
Can not us cd / command to access /(root) directory
Can not us ls / command to display /(root) directory

Analysis:

There may be some network storage disconnected

Solution:

Step One: Use mount command to check if there is any disconnected network storage here

# mount

(Add: At this moment, we can see at least one remote storage mount to local directory. If we cd to this directory, system command prompt will output target is busy)

Step Two: Use unmount command to unmount this disconnected network storage

# umount -f <nfs storage which is stuck>

Or:

# umount -l <nfs storage which is stuck>

Or:

# umount -f -l <nfs storage which is stuck>

[步骤] SLES 软件库的启用和禁用

注意:

在启用或禁用 SLES 的软件库前,要先注册此 SLES

正文:

步骤一:显示所有可用软件库

# SUSEConnect --list-extensions

步骤二:启用软件库

# SUSEConnect -p sle-module-live-patching/15.3/x86_64

(补充:这里以启用 sle-module-live-patching/15.3/x86_64 软件库为例)

步骤三:禁用软件库

# SUSEConnect -d -p sle-module-basesystem/15.3/x86_64

(补充:这里以禁用用 sle-module-live-patching/15.3/x86_64 软件库为例)

[步骤] RHEL 系统的注册 (注册到 Red Hat 官网)

正文:

步骤一:清除旧有的注册信息

1.1 清除所有的旧有注册信息

# subscription-manager remove --all

1.2 取消注册

# subscription-manager unregister

1.3 清楚所有的就有数据

# subscription-manager clean

1.4 确保所有 satellite 客户端安装包已经删除

# yum remove katello-ca-consumer-*

步骤二:确保 RHEL 系统的注册网站指向 Red Hat 官网

# vim /etc/rhsm/rhsm.conf

确保部分内容如下:

......
hostname = subscription.rhsm.redhat.com
......
baseurl = https://cdn.redhat.com
......

步骤三:注册 RHEL 系统到 Red Hat 官网

3.1 非交互式

# subscription-manager register --username <username> --password <password> --auto-attach

(注意:如果完成了本文的 2.1 就不用再执行 本文的 2.2 了)

3.2 交互式注册 RHEL 系统到 Red Hat 官网

3.2.1 交互式注册 RHEL 系统到 Red Hat 官网
# subscription-manager register
3.2.2 在 Red Hat 官网上将相关订阅 (license) 分配给系统

登录 Red Hat 官网 –> Red Hat Customer Portal –> subscriptions –> systems –> <system name> –> 添加订阅

(注意:如果是使用的 Simple Content Access 模式的话,则无需这一步)

3.2.3 刷新订阅
# subscription-manager refresh
3.2.4 查看注册状态
3.2.4.1 查看订阅的消费情况
# subscription-manager list --consumed
3.2.4.2 查看注册状态
# subscription-manager status

参考文献:

https://access.redhat.com/solutions/253273