I will paraphrase and try to translate the following answer, dealing with the etymology part of the question. The author seems to be quoting Nihon kokugo daijiten (日本国語大辞典). It seems that よう！ or よお！ as a greeting, has made its first (confirmed) appearance in the late 16th century. Said appearance was in a christian-published japanese dictionary (since these were the beginning times of the first christian missions to japan).
After that the term, used as a greeting, has made frequent appearances in Edo period texts such as Kabuki and Jōruri texts, common folk art and songs. According to the cited book this leads to the conclusion that the term is a japanese-born one without foreign-language influences.
Just to add my two cents, in my experience よう！ or よお！ is limited to greetings. So yes I guess よう/よお can sometimes be used like yo for greetings. I personally use it a lot with closer friends.
I have not been in the situation to use the second case that much, so it sounds unnatural to me. But in terms of interjections any one of おい、ちょ、ちょっと seem more appropriate and natural, in my experience.
Again this was mostly about the etymology tag, I am no native, and I am also not sure about what nuances you exactly want to get at. So my experience based opinions are to be taken with a grain of salt.