You could pack your guns in grease and then seal them in a nitrogen gas-filled PVC pipe that is glued shut on both ends...
-or-
If you're only going to be away for 2-3 years then the best solution, IMHO, is to use plastic bags, such as these from Brownells:
http://www.brownells.com/.aspx/pid=1154/Product/TRIPLE_TOUGH_trade__PREMIUM_STORAGE_BAGS
You can also use these "vapor tabs":
http://www.brownells.com/.aspx/pid=1207/Product/RUST_BLOX_VAPOR_TABS
The best thing to do would be to completely hose down your firearm with a somewhat "thick" oil such as Breakfree CLP - what I mean by "thick", is, don't use a light mineral-oil based product such as Rem-Oil.
After glopping up your firearm with a rust-preventative oil, stick it in the bag with a couple Rust Blox Vapor tabs inside it.
You can then store them in a gun case, or whatever, until you get back.
The main drawback with storing them in grease is that when you are ready to shoot them again, you first have to get rid of all of that grease that is on them - wiping off a coating of oil is much easier.
A big plus with using the plastic bag is that it makes a moisture barrier so that the guns cannot get wet from whatever reason, humidity included.
Also these bags are tough, so you can use them again and again!
For ammo, the best way to store it would be in genuine GI Ammo Cans which have the little rubber seal still intact.