# yum -y install yum-utils
# yum info yum-utils
# mkdir downloadonlyDir
# yum -y install --downloadonly --downloaddir=/path/to//downloadonlyDir X
# mkdir yumdownloaderDestdir
# yumdownloader --resolve --destdir=/path/to/yumdownloaderDestdir X
yumdownloader --resolve will only download the missing dependencies.
You can use an empty installroot to download the package along with all its dependencies.
# yum -y install X \
--installroot=</path/to/tmp_dir> \
--downloadonly --downloaddir </path/to/rpm_dir> \
--releasever=/
# yumdownloader X --resolve --destdir=/path/to/yumdownloaderDestdir --installroot=/path/to/installroot --releasever=/
repotrack is a program for keeping track of a particular package and its dependencies.
It will download one or more packages and all dependencies.
# mkdir repotrackDir
# repotrack X -p /path/to/repotrackDir
默认下载适配当前架构的主要及其依赖包
How To Download A RPM Package With All Dependencies In CentOS?
https://www.ostechnix.com/download-rpm-package-dependencies-centos
https://www.linuxtechi.com/download-rpm-using-yumdownloader-centos-7-rhel-7
yumdownloader(1) - Linux man page
https://linux.die.net/man/1/yumdownloader
yumdownloader doesn't resolve dependency?
https://serverfault.com/questions/911932/yumdownloader-doesnt-resolve-dependency
https://bugzilla.redhat.com/show_bug.cgi?id=1152326
How to use ( yumdownloader --resolve <package name> ) on ( yum -y groupinstall “Desktop” “Desktop Platform” “X Window System” “Fonts” )?
https://unix.stackexchange.com/questions/89315/how-to-use-yumdownloader-resolve-package-name-on-yum-y-groupinstall
Download Packages With Dependencies Locally In Ubuntu
https://www.ostechnix.com/download-packages-dependencies-locally-ubuntu
How to Download Packages Using Yum/DNF without Installing on Linux
https://linoxide.com/linux-how-to/download-packages-without-installing-rpm-distros
How to create local repo for push agent feature using repotrack?
yumdownloader vs repotrack
https://serverfault.com/questions/470964/yumdownloader-vs-repotrack
Download all dependencies with yumdownloader, even if already installed?
https://unix.stackexchange.com/questions/50642/download-all-dependencies-with-yumdownloader-even-if-already-installed
http://man7.org/linux/man-pages/man1/repotrack.1.html
http://manpages.ubuntu.com/manpages/bionic/man1/repotrack.1.html