Apache – How to Install Apache on RedHat Without Internet Connection

apache-2.2linuxredhat

How do I install Apache + MySQL + PHP on RedHat server without Internet Connection. I know that i can use YUM to install it but because my servers are inside firewall I can't go outside. Is it possible to use my computer (when I'm connection to RedHat via VPN) as a Proxy? if yes then how is it done. Thanks in advance.

Best Answer

You have basically 2 options

  • Download the needed RPMs, copy them to the server and install them manually using rpm -Uvh xxxx.rpm.
  • Set up a local yum repository from a mounted DVD with all RPMs for that distro

The first one is the easiest, and was the way you installed packages before all this yum/repos magic got working (RH 7.3 anyone? :-)). This method will fail if some other RPM is needed (dependency), in case you will also have to download that RPM and include it in the command line.

The second one is better. Involves mounting the DVD, use "createrepo" to create repository fils and setup a repo on /etc/yum.repos.d using "baseurl=file://path/to/repo.data.."

Here is an example.