Created
June 3, 2016 20:51
-
-
Save mbeacom/6bcd9ad7f759fcc9230d0c494735d9bc to your computer and use it in GitHub Desktop.
Shell script for ubuntu servers to install NTP, set the NTP preferred servers to North America, and restart the service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && \ | |
sudo apt-get install ntp && \ | |
sudo sed -i 's/ubuntu.pool.ntp.org/north-america.pool.ntp.org/g' /etc/ntp.conf && \ | |
sudo service ntp restart | |
# One-liner | |
# sudo apt-get update; sudo apt-get install ntp; sudo sed -i 's/ubuntu.pool.ntp.org/north-america.pool.ntp.org/g' /etc/ntp.conf; sudo service ntp restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment