The sites above give two differing origins, so here’s what SOED says:
1751. [a int. + HOY.] Naut. A call used in hailing.
Presumably the interjection “oi!” comes from ahoy. As for the Czech word, we’ll have to wait for languagehat or someone better qualified than me to tell us.
No, no Viking connection here. The Straight Dope has the data for ahoy correct, it is a nautical term and dates to 1751, appearing in Smollett’s Adventures of Peregrine Pickle.
Hoy is an older exclamation, dating to the 14th century. This root, unlike ahoy, is not particularly nautical. The OED2 says it is a “natural exclamation.”
Goody! I can put in a plug for John Biggins and his four novels about the Czech officer in the Imperial and Royal Navy Ottokar Prohaska. In one of them Prohaska reconciles the linguistic differences between the Hungarian and German speakers in a Danube gunboat by persuading them to adopt English as the language of command. In passing he also teaches them cricket…