Our server runs offline and we need to install lot of yum packages, like oracle-jdk, elasticsearch, nginx, etc.
Is there any way to download the rpm dependencies so we can install them offline in the server?
centoscentos7yum
Our server runs offline and we need to install lot of yum packages, like oracle-jdk, elasticsearch, nginx, etc.
Is there any way to download the rpm dependencies so we can install them offline in the server?
Best Answer
Maintain a local CentOS mirror on an Internet-connected machine with
rsync
to a public CentOS mirror that accepts rsync connections. You can then copy these directories to a USB stick and use them as installation sources. They already carry the necessary metadata to act as repositories, so you only need to point the installer at them.In the case of third party packages, you can also mirror those yourself using the
reposync
command line tool, which downloads the contents of yum repositories to a local filesystem, andcreaterepo
, which creates a yum repository out of a set of RPMs in a directory.Remember that repositories do not have to be on the network. They can be located on a local filesystem such as a hard drive, DVD-ROM or USB stick.