[root @ spectrumscale〜]#yum安装yum-utils
设置语言环境失败,默认为C
已加载的插件:最快的镜像
从缓存的主机文件加载镜像速度
没有启用的存储库。
运行“ yum repolist all”以查看您拥有的存储库。
您可以使用yum-config-manager --enable来启用回购协议
答案 0 :(得分:0)
要从特定存储库安装特定软件包,可以使用
child.type.name
假设版本之间可能存在冲突,请考虑安装yum install --enablerepo=name-of-repo name-of-package
的示例,在我的情况下,我有2个仓库mariadb 5.5.66
和mariadb-5
,假设我想从{{1 }}回购,然后我使用
mariadb-10
要启用启用特定回购,您可以使用
mariadb-5
以下是yum install --disablerepo=mariadb-10 --enablerepo=mariadb-5 MariaDB-server MariaDB-client
上的示例
yum-config-manager --enable name-of-repo
要禁用
Centos 7.7
禁用后
[root@localhost server-setup]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@localhost server-setup]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirror.poliwangi.ac.id
* extras: mirrors.piconets.webwerks.in
* remi-safe: mirror.innosol.asia
* updates: mirrors.piconets.webwerks.in
repo id repo name status
CodeIT/x86_64 CodeIT repo 369
base/7/x86_64 CentOS-7 - Base 10,097
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,453
extras/7/x86_64 CentOS-7 - Extras 305
ius/x86_64 IUS for Enterprise Linux 7 - x86_64 641
mariadb-10 MariaDB 94
mariadb-5 MariaDB 39
remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64 3,621
updates/7/x86_64 CentOS-7 - Updates 711
repolist: 29,330
它的实际作用???
我在[root@localhost server-setup]# yum-config-manager --disable mariadb-5
获得了[root@localhost server-setup]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirror.poliwangi.ac.id
* extras: mirrors.piconets.webwerks.in
* remi-safe: mirror.innosol.asia
* updates: mirrors.piconets.webwerks.in
repo id repo name status
CodeIT/x86_64 CodeIT repo 369
base/7/x86_64 CentOS-7 - Base 10,097
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,453
extras/7/x86_64 CentOS-7 - Extras 305
ius/x86_64 IUS for Enterprise Linux 7 - x86_64 641
mariadb-10 MariaDB 94
remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64 3,621
updates/7/x86_64 CentOS-7 - Updates 711
repolist: 29,291
文件,当您使用MariaDB.repo
或/etc/yum.repos.d/
时,它将把--enable <repo-name>
的值更改为--disable <repo-name>
或enabled =
,基于此,0
将向您显示存储库。
1