how to run wi fi 5 miles

Then you need a pair of Ubiquiti or Engenius outdoor access points aimed at one another as high above tree/ground level as you can manage, and without obstructions. Here is a diagram of what you need to accomplish, but 5 miles is a long range, longer than I've done personally:

5dw7.jpg
 
Are you specifically looking at wifi or possibly a wireless bridge? We use Bridgewave devices at work to connect the networks in our different buildings. We use the 60GHz radios since our buildings are only .5 miles apart. For more than a mile or so, you will need 80GHz radios. Also, at that distance, LOS (line of sight) becomes an issue and you need to use GPS coordinates to properly align the radios.

http://www.bridgewave.com/products/80Ghz.cfm