My take:
AFB's: Long runways, pointed in different directions and some margin of built in safety distance equates to a large base, geographically. Peronnel wise, not many people are required to actually fly the planes and I think it averages out to about 6 or 7 ground personnel per aircraft in ground crew (repair people) and then a small number of personnel per plane in Base personnel. The larger the number of planes, the smaller the average of base support there is likely to be (for example, if quarters are offered, one person is required as the warden for one building or the same person can manage six buildings, same for some other jobs). In other support, like fire, ambulance and MP, these should be similar regardless of whether it is a single squadron on base or a wing. The large geographic size of the base, along with the small numbers of personnel, make it more difficult to guard. *someone* is going to have to patrol the entire perimeter of the place, possibly setting out guard posts, standby to chase anyone hopping the fence and any of the multitude of tasks that might come up. All by a bunch of guys and gals who are doing this as a secondary role ("I'm not in the Infantry, I fix airplane engines"). Plus, at least at first, there is the likelyhood of continued flight operations. I agree with Rarick that smaller AFB would be abandoned (and stripped of anything militarily useful).
Naval base: Much the same in many ways as an AFB, except that once the ships leave, they are gone for a while usually. Sure, there is all the dockyard workers and probably some Marines kicking around (I mean that in the nicest possible way), but there is still an area to guard without the ships crews. Tie that in to the fact many Naval bases have become the centre of fairly urban centres, and the Golden Horde that inhabit those, and security will be priority one.
Army/Marine bases: I've grouped both together for brevity. Army/Marine units would be deployed to those areas deemed most critical by the Military command. The government can give them a list, the Army/Marines are only likely to have the ability to guard a fraction of those locations properly. Priorities will be set. Which do you think will get a higher priority: a city undergoing civil strife caused by the collapse of the local government, a seaport/railway transfer facility, a nuclear reactor plant in operation, a water purification plant in a small midwestern town, a FEMA refugee camp outside a different major city, a government facility that issues import/export permits to foreign companies, the border with Mexico, a civilian ammunition plant, the military base and dependants, a local bank, a food distribution point in a quiet middle class town Wally World parking lot, County lockup (for those waiting trial or for sentences of less than 30 days), a power substation, "presence patrol" in a rough area of town with local cops, an Interstate Highway checkpoint.. etc.. Of the 15 I gave, all are likely. An Army/Marine commander must then decide whether he wants to follow the orders to the letter and guard all the locations with a few troops (with a highly mobile reserve as backup) or guard a few places properly and make do with roving patrols at the rest. Streched thin is the term.
I've seen examples of different arms not willingly helping in what is considered another's specialty (like Navy commanders refusing to deploy sailors "above the high water mark" during the aftermath of a hurricane) until orders came down their chain of command expicitly telling them to do so.
Now, getting off base. Depends what you do. Some civilian staff might be deemed "essential" to operations. The military has dropped numbers so low that civilian employees do most of the mundane work (clean, cook, plow roads, paint fences, cut grass.. etc) and the military personnel "rationalized" out of the force. This leaves more available slots for combat troops or "pointy end". Essential staff might be "encouraged" to stay. This offers whatever protection the facility has and at least some food. If it is an economic collapse, then the civilians might be laid off and military troops pressganged into those jobs.
On food and water. Most bases seem to have either done away with the base water purification plant and connected to the local town water supply or at least privatized it (where the corporation sells the water to the base and whoever else). In most cases, there is no long term plan to keep it running (there is a generator, it has some fuel...). Food is usually delivered frequently, sometimes as often as every day (5-6 days a week). Most facilities don't hold massive stocks of field rations either. Sure, there is a big pile on the base, but figure out how many personnel will be eating them along with whatever is sent off to FEMA or whom ever and the number of days starts to get small. 30 days of hard rations for even 100 people is a big pile (9000 individual rations or 900 cases). Now imagine the pile of rations for a brigade of 5000 troops for 30 days. The exception to this would be a central supply depot. Most of that should be shipped out to user end storehouses in the event of a pending emergency. Part of that might be sending extra stocks off to overseas bases in the event of emergencies in the host country.
Now, in the case of any installation, as Bear has indicated (I think), a Base Commander has a pretty hefty combat force on hand. If discipline can be maintained (especially if families are brought on base "to replace those civilian contractors we can no longer pay") then a local commander can become the local warlord (based on the overwhelming firepower and training of the troops). Sending out foraging parties (of well trained, well armed troops) would become essential to maintaining that force. The force would continue to exist to support the force (self licking ice cream cone theory).
Security on a base, whether now or after a crash, would be paramount. Sadly, there are no rooms full of unlocked and unguarded automatic weapons on military bases anymore. The terrorist boogeyman has made damn sure that doeesn't happen. Most places don't even store the bolts in the same place as the rest of the weapon. Even if the base slowly emptied out, those final few soldiers left would load all the automatics into a truck and bugger off, whether into the sunset or to another base (likely, as ordered). Nothing that could go bang or boom would be left behind. Many smaller bases don't have more than a few hundred rounds of ammunition per rifle, usually held by the base security unit. When a unit plans to go to the range, ammunition is brought in from another, larger base or the troops go there (where there is likely a range anyways...those cost money for upkeep).
JWR's book "Patriots" has been mentioned. I have a copy and think it is a great read that is full of useful information on prepping.
However, he seems to anticipate that *only* the US collapses. I would speculate that most of society would collapse, whether due to economics or brute force. The US is, regardless of what many people would like to admit, one of the main factors keeping the world "civilized' (as such). Without the US big stick being waved, most of the undesireable nations, who are held in check by the big stick, would attack their US supported neighbour. The US supplies large amounts of supplies to emergencies and considerable sea and airlift capability. Much of Africa and parts of Asia along with other countires, their currency tied to the FRN, would be functionally bankrupt regardless of the billions of paper dollars they hold.