Separate Ubuntu specifics into OS-specific case statements, add prerequisites to work with Centos 6

This PR adds support for Centos 6 and separates prerequisites into OS-specific case statements.  Thank you!