Skip to content

Instantly share code, notes, and snippets.

@zwned
Created December 22, 2011 13:08
Show Gist options
  • Save zwned/1510262 to your computer and use it in GitHub Desktop.
Save zwned/1510262 to your computer and use it in GitHub Desktop.
ESX NTP configuration in a nutshell
cat << EOF | tee /etc/sysconfig/clock
ZONE="US/Eastern"
UTC=false
ARC=false
EOF
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
cat << EOF | tee /etc/ntp.conf
restrict default kod nomodify notrap nopeer
restrict default ignore
0.north-america.pool.ntp.org
1.north-america.pool.ntp.org
2.north-america.pool.ntp.org
3.north-america.pool.ntp.org
driftfile /var/lib/ntp/drift
EOF
cat << EOF | tee /etc/ntp/step-tickers
0.north-america.pool.ntp.org
1.north-america.pool.ntp.org
2.north-america.pool.ntp.org
3.north-america.pool.ntp.org
EOF
service ntpd start
chkconfig --level 345 ntpd on
hwclock --systohc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment