Differences
This shows you the differences between two versions of the page.
linux_wiki:configure_a_system_to_use_time_services [2016/03/03 23:05] billdozor |
linux_wiki:configure_a_system_to_use_time_services [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configure A System To Use Time Services ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Managing time using different methods. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Time Options ===== | ||
- | |||
- | * ntp => the default in RHEL 5/6 | ||
- | * chrony => the default in RHEL 7 (ntp can still be used instead) | ||
- | * Chrony has faster time sync than ntp and can recover from network connection problems faster. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Chrony ===== | ||
- | |||
- | Two new RHEL 7 tools: | ||
- | * chronyd - new red hat 7 time daemon (ntpd was previous daemon) | ||
- | * timedatectl - time and date settings information | ||
- | |||
- | \\ | ||
- | View current detailed time information | ||
- | <code bash> | ||
- | timedatectl | ||
- | </ | ||
- | |||
- | \\ | ||
- | View available timezones | ||
- | <code bash> | ||
- | timedatectl list-timezones | ||
- | </ | ||
- | |||
- | \\ | ||
- | Set timezone | ||
- | <code bash> | ||
- | timedatectl set-timezone America/ | ||
- | </ | ||
- | |||
- | \\ | ||
- | Set system clock to 12:30pm and 10 seconds: | ||
- | <code bash> | ||
- | timedatectl set-time 12:30:10 | ||
- | </ | ||
- | |||
- | \\ | ||
- | Enable the use of NTP for time | ||
- | <code bash> | ||
- | timedatectl set-ntp true | ||
- | </ | ||
- | |||
- | \\ | ||
- | NTP service config file (chronyd) | ||
- | * / | ||
- | |||
- | \\ | ||
- | NTP server entry examples in / | ||
- | <code bash> | ||
- | server 0.pool.ntp.org iburst | ||
- | server 1.pool.ntp.org iburst | ||
- | server 2.pool.ntp.org iburst | ||
- | server 3.pool.ntp.org iburst | ||
- | </ | ||
- | * If you make any changes, chronyd service must be restarted | ||
- | |||
- | \\ | ||
- | Check status of NTP service, Restart it | ||
- | <code bash> | ||
- | systemctl status chronyd | ||
- | systemctl restart chronyd | ||
- | </ | ||
- | |||
- | \\ | ||
- | View NTP sources | ||
- | <code bash> | ||
- | chronyc sources -v | ||
- | </ | ||
- | |||
- | ---- | ||