Shake his hand and say "Nice to meet you again. How have you been doing?" for the following reasons.
- The reasons you both had problems were professionalism related and not personal issues. It would be a nice gesture from your end.
- Always give a chance, when you are in doubt. He would have changed professionally by learning a lot during these five years.
- Be the first person to build the bridge. It gives you an opportunity to understand the individual and influence. Being courteous is a part of being professional.
It is good to be nice to people and treat them how you would like to be treated.