rhcsa question: The system time should be set to your (or nearest to you) timezone and ensure NTP sync is configured
solution:
1) use command timedatectl
What is timedatectl?
- timedatectl is command allows you to both query and change the system clock
- setting ntp connection
- control the system time and date
2) How to use?
- we need list of timezones:
command:
timedatectl list-timezones
- setting timezone
timedatectl set-timezone Europe/Berlin
- verify
timedatectl
3) check ntp connection
- check
[root@test21541RHCSA ~]# timedatectl
Local time: Mon 2022-04-18 21:27:38 CEST
Universal time: Mon 2022-04-18 19:27:38 UTC
RTC time: Mon 2022-04-18 21:27:38
Time zone: Europe/Berlin (CEST, +0200)
NTP enabled: yes
4) set ntp via timedatectl
timedatectl set-ntp true
5) restart service
restart systemd-timedated
6) enjoy and eat ice cream ;-)
7) of course we need configuration chronyd
Žiadne komentáre:
Zverejnenie komentára