Download RPM package from yum repository
To download RPM file from yum repo, you need to install yum-utils package.
1 |
yum install -y yum-utils |
Now you can use command
1 |
yumdownloader --resolve --destdir=/path/ PACKAGE_NAME |
Example
1 |
yumdownloader --resolve --destdir=/root/yum/ nginx |
This will download and store all rpm files in /var/yum folder. –resolve will resolve dependency and download them. This will be helpful if you need to install a package on a system with no direct internet connection.
See yum