Skip to content

Instantly share code, notes, and snippets.

@capoferro
Created November 2, 2015 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capoferro/cfdc723ffad22bc13a0e to your computer and use it in GitHub Desktop.
Save capoferro/cfdc723ffad22bc13a0e to your computer and use it in GitHub Desktop.
curl -LO http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p3.tar.gz
tar xzvf ntp*.tar.gz && rm ntp*.tar.gz
cd ntp*
./configure
make
sudo make install
sudo sed -i.bak 's/sntp/\/usr\/local\/bin\/sntp/g' /usr/libexec/ntpd-wrapper
sudo sed -i.bak2 's/\/usr\/sbin\/ntpd/\/usr\/local\/sbin\/ntpd/g' /usr/libexec/ntpd-wrapper
sudo cp /etc/ntp.conf /etc/ntp.conf.bak
echo "driftfile /var/db/ntp.drift
pool 0.us.pool.ntp.org iburst
pool 1.us.pool.ntp.org iburst
server time.apple.com iburst" > ntp.conf
sudo mv ntp.conf /etc/ntp.conf
sudo launchctl stop org.ntp.ntpd
sudo launchctl start org.ntp.ntpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment