Were there alternatives? A way of greeting that would be totally creepy nowadays?
I read once that by shaking hands you're showing the other person you hold no weapon. It is thought to have originated thousands of years ago in ancient Greece.
I second Kabulamonogoni's statement. It originated in Greece, with a 5th century BC depiction of two soldiers shaking hands on a funerary stele. Another stele from the 4th century BC shows a man and wife shaking hands (so maybe not in the context of introduction). The handshake is thought by some to have originated as a gesture of peace by demonstrating that the hand holds no weapon, which is why you shake with the right hand (your weapon hand).
In terms of creepy greetings, hand-kissing would be one - which has been common, particularly when meeting women for a long time (some say 1500, but surely by the 1700s was common)