CentOS 7 本地存储库可供客户端使用,但无法执行 yum groupinstall

CentOS 7 本地存储库可供客户端使用,但无法执行 yum groupinstall

我们的内部存储库(CentOS 7 镜像)除了组之外都可以使用。我收到一个请求,要求将我们的一些仅支持 cli 的盒子转换为 gui,并在任何其他上使用 yum grouplist客户端服务器不起作用:

#yum grouplist
...    
Warning: no environments/groups match:

这是工作目录和树的输出本地仓库

#pwd
/usr/share/nginx/html/repos

#tree -f -L 2
.
├── ./base
│   ├── ./base/29b154c359eaf12b9e35d0d5c649ebd62ce43333f39f02f33ed7b08c3b927e20-c7-x86_64-comps.xml.gz
│   ├── ./base/aced7d22b338fdf7c0a71ffcf32614e058f4422c42476d1f4b9e9364d567702f-c7-x86_64-comps.xml
│   ├── ./base/bc140c8149fc43a5248fccff0daeef38182e49f6fe75d9b46db1206dc25a6c1c-c7-x86_64-comps.xml.gz
│   ├── ./base/comps.xml
│   ├── ./base/d87379a47bc2060f833000b9cef7f9670195fe197271d37fce5791e669265e8b-c7-x86_64-comps.xml
│   └── ./base/Packages
├── ./extras
│   ├── ./extras/6249194f201fd98d817318368f544472d1967d70034905e1ae94309fe0788390-prestodelta.xml.gz
│   ├── ./extras/6ddc7ed4f8b31ae5fe805eb71716d60413495a98094b0b2ef5a955d6c78ab1fd-prestodelta.xml.gz
│   ├── ./extras/7bfbfe37bf58e06bd769e6e9aac3373c8b2941bad873d6e60ab76ab06f7e1f7d-prestodelta.xml.gz
│   ├── ./extras/7cad6e1384259543ec8d39d74e181b1b78621f8c2a93f5f2f9fd9afa90b19cd6-prestodelta.xml.gz
│   ├── ./extras/96ea0e38f9f07540a380d93b9c3ecdf65dcac5a0c23009bb2ae6767cbb4fb999-prestodelta.xml.gz
│   ├── ./extras/9718255a5fa57675311c5ac73719bee470f94b10d38b5aa988511b9ddd860025-prestodelta.xml.gz
│   ├── ./extras/aeff1fc94ae975c9934c43b804f2a59b4e25ffd40008407428d1102585d22c57-prestodelta.xml.gz
│   ├── ./extras/ea35765e72afae3e1539686da06393ce09fe26a04dbf576e218f994e4b7a706a-prestodelta.xml.gz
│   ├── ./extras/ecd0c8c4bda34ed6868c638797836979795f4203eff548f5d3b3149037a4978c-prestodelta.xml.gz
│   └── ./extras/Packages
├── ./repodata
│   ├── ./repodata/21c842bf31224ae53d7544031e21017321bd41487c071e3f4b4d7dc39369cd50-other.xml.gz
│   ├── ./repodata/2444a67c3a57c91b15ec14826b86aac1d796f5923449b39862b6554fbed17930-other.sqlite.bz2
│   ├── ./repodata/2a16ba2c05973628988923fdccb1de30ee1be2116d94f573e6c7619ab6acee80-primary.sqlite.bz2
│   ├── ./repodata/99b3a81a30f947a55ea405712a372bdd7858ddd89520797ee598a3d2f3aa46ec-filelists.sqlite.bz2
│   ├── ./repodata/b465afba7b9059ed98fdd7f1018fcdd969ca8ab8572832818899a5c8a02dfb63-filelists.xml.gz
│   ├── ./repodata/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-comps.xml
│   ├── ./repodata/f4607fe7a52a7957e55c4296b590c3b60eeb86f25a56fe72ebb0c113d145b9ed-primary.xml.gz
│   ├── ./repodata/f61f27bd17de546264aa58f40f3aafaac7021e0ef69c17f6b1b4cd7664a037ec-comps.xml.gz
│   └── ./repodata/repomd.xml
└── ./updates
    ├── ./updates/133ad64118f3858ad8f661bdf19c224f040d83e3aad9d1ba50bc96f6d61066da-prestodelta.xml.gz
    ├── ./updates/192ba72883037c74260a4ff1df6250df30007a1d559dea32a4f4ec5611b4c374-prestodelta.xml.gz
    ├── ./updates/1d6260ee3a8906591d1aa71139f88ba44356068699de83c5d7deed301c415ab6-prestodelta.xml.gz
    ├── ./updates/266409b1b90e936d270d351a7022bffd04e683ffd6797e21249a3e0564a79e73-prestodelta.xml.gz
    ├── ./updates/3e3f7a5276f0d5d6f9e0aad5891a41e2cb7163ef9c5807521708474849edc466-prestodelta.xml.gz
    ├── ./updates/654699eed4d92ccdb8472b40c71b9278b0694ad8989504671075c945d686a80b-prestodelta.xml.gz
    ├── ./updates/79700c4a1d03042a21b05153329b77ab243973ef7862f36778f7e419d32c150e-prestodelta.xml.gz
    ├── ./updates/79a978dce83e6f7d1def4de8dde07aa9a9f255d541070faffd74ba8e6cb81a88-prestodelta.xml.gz
    ├── ./updates/7c20d8e4a9d217846fce5acc1c2ec51909a784ecd398be147b108ab0db65b6d4-prestodelta.xml.gz
    ├── ./updates/80429bc37444d1f7db4999a9637f7d24cfece0a897d7e4fbd92e393a85bdbbd5-prestodelta.xml.gz
    ├── ./updates/84a6837c67a1e571dfd5c69e155c0d4c99dfddbe6777b062c15f956ac3c0ccdc-prestodelta.xml.gz
    ├── ./updates/8ee07a5e1fde5231fed8ce55547405923af529a0902e57aeee1676035ae7a367-prestodelta.xml.gz
    ├── ./updates/9113f631ba0f5c1c80b14bcf7e3252abe16279b41309fd537fc28af972168ef2-prestodelta.xml.gz
    ├── ./updates/95b8c0200ddcaaecb181b7dff6a7dcc7ed893e7ad381f493332ff1f039982f1c-prestodelta.xml.gz
    ├── ./updates/98df664236c573aa7c83eeacc5866e893741ff8964a2ca12d61038372c12595b-prestodelta.xml.gz
    ├── ./updates/9b397cd863da2ea51132f0c83e92caefef81336da73e1f96c5b3964291a9b3f4-prestodelta.xml.gz
    ├── ./updates/a47f45c726fee112d1e2d91ab67602665031173634e07e90095f1eccf20a980c-prestodelta.xml.gz
    ├── ./updates/a50169befc41a72a7cf4aa24b83e58302259e9b85965866317f7afa94b9d7543-prestodelta.xml.gz
    ├── ./updates/afce2657dd9088d64f02c1ca290d32e64058ebd6b61adc97d6aa8918b2fcfa2d-prestodelta.xml.gz
    ├── ./updates/c1ad3aa6f81c741ae35ee34d51713de8fd9cadd79125816ba8f859ca492f31b6-prestodelta.xml.gz
    ├── ./updates/da171da0658b69aa3475f595e9840b5759f20121f9e16fba63dc9bad679527aa-prestodelta.xml.gz
    ├── ./updates/ebf5e51765e65dc6c56ad52966689acb03191c2e596916253fa8300e0ac228d5-prestodelta.xml.gz
    ├── ./updates/f0a0c0081e212f2e527a54d4ef261c9f1313e9ca3fb647b263b04f29af2ef3d6-prestodelta.xml.gz
    ├── ./updates/f6f40e72911605986bb16159e125d10e5fa3e1e640c0d1c37bc529a7bd96b810-prestodelta.xml.gz
    ├── ./updates/f789992a240a9f2ac250f81d20882c215d1d1b2d6c0b513e862f32904102fad3-prestodelta.xml.gz
    ├── ./updates/fd2186bbf3d231d441dc73bc0d0a3f2b79d5c212d14ceadf9a878fb2a5808de3-prestodelta.xml.gz
    ├── ./updates/fea79aa892efb51ac34905043ac437c99e441d26266e7d37981a7256df9961e1-prestodelta.xml.gz
    └── ./updates/Packages

7 directories, 50 files

并且 comps.xml 是非 0 字节文件(我提到这一点是因为 createrepo -g 并不总是“更新”受影响的 comps.xml):

ls -l comps.xml
-rw-r--r-- 1 root root 913932 Mar 26 00:00 comps.xml

我注意到了

createrepo -g comps.xml /path/to/repo

如果不先接触 comps.xml,则无法工作。我的 comps.xml 是否放在了正确的位置?在其他地方(例如 repodata 目录),yum grouplist 也无法工作。在客户端,手动包更新/安装可以正常工作。

本地存储库 cron 作业:

#!/bin/bash

/bin/reposync -l -d -m --download-metadata --newest-only --download_path=/usr/share/nginx/html/repos/ --repoid=base
/bin/reposync -l -d -m --download-metadata --newest-only --download_path=/usr/share/nginx/html/repos/ --repoid=updates
/bin/reposync -l -d -m --download-metadata --newest-only --download_path=/usr/share/nginx/html/repos/ --repoid=extras

createrepo --update /usr/share/nginx/html/repos/

相关内容