Either “早上好” or “早安” is a translation of “good morning”. However, we rarely speak or write like that in daily life. If you would like to know something more “Chinese”, see next.
“好” has many means as other Chinese words have. One of them is equal to “good” in English. Maybe you can use one’s appellation and “好” to express meaning like “Hello!” in English. For example, if you meet your teacher(“老师” in Chinese), you can say “老师好” to him or her. To simplify it, you could just say “您好”(with more respect) or “你好”(with more familiar) to anyone you speak to or you write to.
Last but not least, we do not actually emphasize the time when we say hello. So phrases like “Good morning”(早上好), “Good afternoon”(下午好) and “Good evening”(晚上好) are not used much in China.
Sorry about my poor English.