This is a small script I developed to configure NTP on my hosts before deploying the Ambari server or agent and Hadoop:
#!/bin/bash #Script Name: ignacio_config_ntp.scr #Author: Ignacio de la Torre #Independent Contractor Profile: https://linkedin.com/in/idelatorre ################# #configure ntp to auto-start at boot time #Install NTP sudo yum install -y -q ntp #Disable autostart sudo systemctl disable ntpd sudo timedatectl set-ntp no #configure NTP sudo ntpdate pool.ntp.org sudo timedatectl set-timezone America/Los_Angeles #re-enable NTP autostart sudo systemctl enable ntpd sudo timedatectl set-ntp on