In the days of the NX-01, how would one become an officer?

There is no Starfleet academy, and I can’t recall a discussion of any person from earth attending a university (apart from Archer referring to Cal, Stanford, and Texas? in Water Polo) and entering laterally through ROTC

I was watching S2 E20 “Horizon”, where Travis goes back to his family ship and his mom said they were discussing his joining Starfleet 4 years prior. He had been on the ship for about a year at that point, so was he granted rank based on his experience on his family ship, or was there an OCS school?