Redhat 9 禁用注册提示 更换阿里云yum源
- 禁用注册提示
方法一:禁用Subscription Management提示
# 修改两个文件,使其中的Enable=0
vim /etc/yum/pluginconf.d/product-id.conf
vim /etc/yum/pluginconf.d/subscription-manager.conf
方法二:卸载Subscription Management
# 查找subscription-manager相关应用进行卸载
rpm -qa | grep subscription-manager
yum remove subscription-manager-gnome
yum remove subscription-manager-firstboot
yum remove subscription-manager
# 删除菜单里面的注册项
yum remove rhn-setup-gnome
# 或者直接:
yum list subscription\*
yum remove subscription\* -y
- RHEL9更换yum源为阿里云的yum源
mv redhat.repo redhat.repo.bak
# 创建一个新的配置文件
touch aliyun.repo
vim aliyun.repo
# 编辑aliyun.repo
[base]
name=CentOS-9-stream - Base - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/$basearch/os/
enable=1
gpgcheck=0
[AppStream]
name=CentOS-9-stream - AppStream - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/AppStream/$basearch/os/
enable=1
gpgcheck=0
# 更新缓存
yum clean all
yum makecache