Up until the 1980s or so, small arms training on ships was pretty much an afterthought. If you had an in-port watch assignment that meant you may have to carry a weapon, you were shown how to load and unload it. Then you were given a chance to "familiarization fire" it. When the ship was steaming independently (not in formation), a group of sailors were assembled on the fantail with a gunner's mate. If your assignment meant you had to carry a .45, the gunner's mate loaded it (with five rounds in the magazine) and handed it to you. You then pointed the weapon aft of the ship and fired off all five rounds.
If you managed to hit the ocean, you passed.
That, for obvious reasons, was not very satisfactory.
The next plan was to qualify on full-sized silhouette targets. The targets were supposed to be set at 25 yards. You then fired 30 rounds; ten at slow-fire, ten at timed fire, ten at rapid fire. (Definitions here.) If you finished up with 20 holes in your target, you were qualified.
That had its own problems. Few ships, other than carriers, had a place where you could set up a target, move back 75 feet and not either have fallen over the side or have something in-between the shooter and the target. So the smaller ships had to use a shore-side rifle range to qualify.
That raised a lot more problems. Nearly every non-engineering petty officer on every ship had to qualify with a .45, as the Petty Officer of the Watch post in port was an armed watch. All of the sailors on the security teams had to qualify with a .45, M-14 rifle and riot shotgun. Half of the officers had to qualify with a .45. So possibly a hundred or more sailors from each ship had to shoot for qualification on a yearly basis, and even in a small port, that meant that several thousand sailors had to qualify.
The base pistol ranges were not set up for that amount of use and they quickly became overwhelmed. There might be a seven month waiting list, which was unsatisfactory to the ships.
So they began to find creative solutions. If a chief on one of the ships was a member of a gun club, he would make a deal with the club to use their range in exchange for the ship providing a large tin of coffee or a work/cleanup detail. Some ships found informal ranges in national forests that were usable during the week.
Meanwhile, the bases had begun programs to expand the hours and the sizes of their ranges, only to find out that the demand was evaporating. The solution most base commanders adopted was to forbid the use of civilian ranges for "liability concerns." That was an order that was widely ignored.
Ultimately, the Navy adopted reduced-sized silhouette targets that were suitable for ten-yard ranges. Most ships had small helicopter flight-decks; the target holders were set on the edge of the deck and the shooters stood on the other side of the flight deck. So as long as the ship was off on its own, they could qualify a lot of people rapidly.
There was some talk about starting to send teams to a "Hogan's Alley" sort of advanced training, but I don't know if that ever became a reality.