Last active
March 24, 2021 22:56
-
-
Save tobernguyen/8fd51c2ff44adec449529a765555cfaa to your computer and use it in GitHub Desktop.
Setup Amazon Time Sync on Ubuntu EC2
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
#!/bin/bash | |
set -xe | |
# Install Chrony and use Amazon Time Sync Service | |
sudo apt install chrony -y | |
sudo sed -i '1s;^;server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4\n;' /etc/chrony/chrony.conf | |
sudo /etc/init.d/chrony restart | |
# For install verification | |
sleep 5 | |
chronyc sources -v | |
chronyc tracking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment