开发者

Populate The Custom Yum Repository with list

I have a list of 350 rpms list开发者_开发技巧ed in a text file that are also installed in a cluster that is not online with the outside world. We have an internal yum repository. Is there a way to take the list, and download all the 350 installs for yum to bring back to the cluster? I hate thinking of downloading them one by one.

Thanks


reposync and making internal repos. (and then using kickstart) is better option, IMO. But if you want to just download, then something as simple as:

yumdownloader $(cat myfile)

...might well do it. yumdownloader is in the yum-utils package. If you need to use yum/yum-downloadonly then you can do:

yum --installroot=/tmp/my-installroot --downloadonly install $(cat myfile)

...that will get you all the deps. too (not sure if that's what you want). If it doesn't fit on the command use yum shell:

perl -pe 's/^/install /' myfile > myfile-shell
echo run >> myfile-shell
yum --installroot=/tmp/my-installroot --downloadonly shell myfile

...but again, I think you really want to have usable repos. on your yum machines.


Try:

yum install `cat /path/to/pkgs_list`
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜