取消redhat注册。
[root@localhost ~]# vi /etc/yum/pluginconf.d/subscription-manager.conf
[main]
enabled=0
# When following option is set to 1, then all repositories defined outside redhat.repo will be disabled
# every time subscription-manager plugin is triggered by dnf or yum
disable_system_repos=0
配置aliyun源
[root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
[root@localhost ~]# dnf clean all && dnf makecache
测试安装
[root@localhost ~]# dnf install vim