CentOS管理软件仓库可使用以下方法:
yum-config-manager --add-repo <仓库URL>命令,如yum-config-manager --add-repo http://mirrors.aliyun.com/repo/Centos-8.repo。也可将仓库的.repo文件放到/etc/yum.repos.d/目录下。/etc/yum.repos.d/下的.repo文件,设置baseurl为本地路径。dnf repolist(CentOS 8)或yum repolist(CentOS 7)查看已启用的仓库。yum-config-manager --enable <仓库名>或yum-config-manager --disable <仓库名>。dnf clean all或yum clean all清理所有缓存。dnf makecache或yum makecache生成缓存,加快软件包安装和更新速度。