Easiest way to set CDH/Cloudera Hadoop is to use parcels.
The parcels are downloaded from the internet (Cloudera archives) .
When there is no internet connectivity , we need to download the parcels and set up a local server and point CM(Cloudera Manager ) to the local server.
Download the parcels from the below link.
Depending on your linux flavor download the appropriate parcel file and manifest.json file.
For ubuntu i downloaded CDH-4.5.0-1.cdh4.5.0.p0.30-precise.parcel .
Setting up Apache server
Install apache server.
On ubuntu i used the below command.
sudo apt-get install apache2
Check from the browser http://localhost:80 .
The above link should give a success message. Which means apache server is successfully running on your computer.
Under /var/www/ directory there is a file called index.html .
Please delete the file.
Make a structure inside the /var/www/ like the below
Copy the parcel file to the above location.
Now you will be able to access the parcels from your URL (http://localhost:80)
Now open Cloudera manager.
Edit remote parcel repository Urls to your local URL.
Now you can download the parcels from your local server and distribute.