This article introduces how to set the time synchronization of Aria Suite Products with systemd-timesyncd.
Follow below steps to configure NTP using CLI
1. Edit /etc/systemd/timesyncd.conf file as follows, and Save the file.
---/Default [Time] #NTP= #FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com ...
---/After changing [Time] NTP=<NTP Server(IP/FQDN)> #FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com
...
"<NTP Server>" is to be your NTP Server's FQDN.
2. Restart systemd-timesyncd with the following command.
root [~] # systemctl disable systemd-timesyncd.serviceroot [~] # systemctl enable systemd-timesyncd.serviceroot [~] # systemctl restart systemd-timesyncd.service
After setting up NTP, you can see that the service is running with the status similar to:
root [~] # systemctl status systemd-timesyncd.service
systemd-timesyncd.service-Network Time Synchronization Loaded: loaded (/etc/systemd/system/systemd-timesyncd.service; enabled) Active: active (running) since Mon 2015-06-01 14:40:44 UTC; 3s ago Docs: man: systemd-timesyncd.service (8)Main PID: 334 (systemd-timesyn) Status: "Using Time Server 106.186.114.89:123 (0. NTP_FQDN)." CGroup: /system.slice/systemd-timesyncd.service mq334 / lib / systemd / systemd-timesyncd
We can also see timedatectl "NTP synchronized" is now "yes".
root [~] # timedatectl
Local time: Mon 2015-06-01 14:44:45 UTC Universal time: Mon 2015-06-01 14:44:45 UTC RTC time: Mon 2015-06-01 14:44:45 Time zone: UTC (UTC, +0000) NTP enabled: yesNTP synchronized: yesRTC in local TZ: no DST active: n / a
Notes: The preceding command excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.