When meeting people (formal):
Good morning/ afternoon/ evening.
When meeting people (informal):
Hello. Hi. (very informal)
When leaving people:
Good morning/ afternoon/ evening / night. (formal)
Goodbye. (less formal) Bye. (informal)
Bye-bye. (often used to and by children) Cheerio.
See you. (informal) See you later/ tomorrow/ next week/ etc. (informal)
Cheers. (informal – British only) Take care. (informal)
It was nice to meet you.
Note that Goodnight is used only when leaving people, not when meeting them.