TECHIES WORLD

For Techs.... Techniques.... Technologies....

Linux

How to configure time sync service in AWS

The Amazon Time Sync Service is available through NTP at the 169.254.169.123 IP address for any instance running in a VPC. Your instance does not require access to the internet, and you do not have to configure your security group rules or your network ACL rules to allow access.

This tutorial explains the procedures to configure the Amazon Time Sync Service on your instance using the chrony client.


On Amazon Linux

Step1: Uninstall the NTP service.

#yum erase ntp*

Step2: Install the chrony package.

#yum install chrony

Step3: Open the /etc/chrony.conf file.

#vi /etc/chrony.conf

Step4: Verify that the file includes the following line. If not, add the line after any other server or pool statements that are already present in the file.

server 169.254.169.123 prefer iburst

Step5: Start the chrony daemon (chronyd).

#service chronyd start

Note that on RHEL and CentOS (up to version 6), the service name is chrony instead of chronyd.

Step6: Enable chronyd to start at each system boot.

#chkconfig chronyd on

Step7: Verify that chrony is using the 169.254.169.123 IP address to synchronize the time.

#chronyc sources -v

Step8: Verify the time synchronization metrics that are reported by chrony.

#chronyc tracking



On Ubuntu

Step1: Install the chrony package.

#apt install chrony

Step2: Open the /etc/chrony/chrony.conf file using a text editor. Add the following line before any other server or pool statements that are already present in the file.

server 169.254.169.123 prefer iburst

Step3: Restart the chrony service.

#/etc/init.d/chrony restart

Step4: Verify that chrony is using the 169.254.169.123 IP address to synchronize the time.

#chronyc sources -v

Step6: Verify the time synchronization metrics that are reported by chrony.

#chronyc tracking


 

We can configure the timezone by following the steps in http://techies-world.com/set-timezone-linux/.

 

That's all......

Leave a Reply