Updated to support CentOS6 and CentOS7.