It depends on the kind of friends and it has various ways of saying it for the formarity. Here are "some" common ways.
To old friends who is the same age or younger than you, or whom you talk with in the casual form:
(name of the friend)、おはよう!げんき?
*We don't call friend ともだち like you do.We call friends with ちゃん、くん or something, or without them (we call only her/his name). All depends on the relationship, it comes naturally during we creat friendship.
To the friends who is older than you, whom you know recently, I mean, whom you talk with in the formal form:
(name)さん、おはようございます。おげんきですか。
However, we don't ask "how are you?" to the friends we meet everyday or very often, except we know they aren't fine. After they get well, we generally ask だいじょうぶ?(casual) or だいじょうぶですか(formal) / おかげんはいかがですか(very polite).
I hope this helps you.