How to install yum packages on machine not connected to internet?

Posted on

To install node.js on RHEL machine which is not connected to internet, I used yum's --downloadonly option.

So I ran the following command on a machine connected to internet

yum install --downloadonly --downloaddir=/node nodejs

This command download rpm packages for nodejs and it's dependencies. I copied these rpm packages to the machine not connected to internet.

But I am not able to install them using rpm command

rpm -Uvh *.rpm

This does not work due to inter-dependent dependencies.

Is there any alternative? What can I do?

Responses