User Tools

Site Tools


wiki:ntp_start_at_boot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:ntp_start_at_boot [2018/05/11 09:45] walkeradminwiki:ntp_start_at_boot [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 5: Line 5:
 \\  \\ 
  
 +This was created and tested using CentOS 7.x
 ---- ----
 Chrony is introduced as new NTP client to replace the ntp as the default time syncing package since RHEL7, so if you configure NTP during the installation process, it just enables the chronyd service, not ntpd service. Chrony is introduced as new NTP client to replace the ntp as the default time syncing package since RHEL7, so if you configure NTP during the installation process, it just enables the chronyd service, not ntpd service.
Line 38: Line 39:
 May 11 08:31:47 eri-4e-962955 systemd[1]: Started Network Time Service. May 11 08:31:47 eri-4e-962955 systemd[1]: Started Network Time Service.
 </file> </file>
 +\\ 
 +\\ 
 +In the /etc/ntp.conf file you can add your own NTP server source.
 +\\ 
 +    server x.x.x.x iburst
 +\\ 
 +Once added, you can use the following commands to see the NTP status:
 +\\ 
 +    ntpstat
 +    
 +    When you first run this you will probably see:
 +    
 +    unsynchronised
 +       polling server every 64 s
 +    
 +    But after a while, it should chanage (15-30 minutes normally)
 +    
 +    synchronised to NTP server (194.80.204.184) at stratum 2
 +       time correct to within 41 ms
 +       polling server every 64 s
 +
 +
 +    systemctl status ntpd.service
 +    
 +    ● ntpd.service - Network Time Service
 +       Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
 +       Active: active (running) since Thu 2018-06-28 15:21:49 BST; 25min ago
 +     Main PID: 1501 (ntpd)
 +       CGroup: /system.slice/ntpd.service
 +           └─1501 /usr/sbin/ntpd -u ntp:ntp -g
 +    
 +    Jun 28 15:43:58 eri-4e-963128 ntpd[1501]: Listen normally on 17 eth4 fe80::a6bf:1ff:fe3a:54ac UDP 123
 +    Jun 28 15:43:58 eri-4e-963128 ntpd[1501]: Listen normally on 18 eth5 fe80::a6bf:1ff:fe3a:54ab UDP 123
 +    Jun 28 15:43:58 eri-4e-963128 ntpd[1501]: new interface(s) found: waking up resolver
 +    Jun 28 15:44:08 eri-4e-963128 ntpd[1501]: Deleting interface #18 eth5, fe80::a6bf:1ff:fe3a:54ab#1...secs
 +    Jun 28 15:44:08 eri-4e-963128 ntpd[1501]: Deleting interface #17 eth4, fe80::a6bf:1ff:fe3a:54ac#1...secs
 +    Jun 28 15:44:10 eri-4e-963128 ntpd[1501]: Listen normally on 19 eth5 fe80::a6bf:1ff:fe3a:54ab UDP 123
 +    Jun 28 15:44:10 eri-4e-963128 ntpd[1501]: Listen normally on 20 eth4 fe80::a6bf:1ff:fe3a:54ac UDP 123
 +    Jun 28 15:44:10 eri-4e-963128 ntpd[1501]: new interface(s) found: waking up resolver
 +    Jun 28 15:44:41 eri-4e-963128 ntpd[1501]: Deleting interface #20 eth4, fe80::a6bf:1ff:fe3a:54ac#1...secs
 +    Jun 28 15:44:41 eri-4e-963128 ntpd[1501]: Deleting interface #19 eth5, fe80::a6bf:1ff:fe3a:54ab#1...secs
 +    Hint: Some lines were ellipsized, use -l to show in full.
 +    
 +
 +    ntpq -p
 +    
 +    This will display the timeservers found and their statistics
 +    
 +         remote           refid      st t when poll reach   delay   offset  jitter
 +    =============================================================================
 +     ttvadc02.tandbe 137.58.65.3      5 u   29   64  377    0.457  30554.8  14.013
 +    +www.bhay.org    85.199.214.98    2 u    6   64  377    5.135   30.351  11.382
 +    +time.netweaver. 85.199.214.98    2 u   34   64  377    4.581   29.606  10.153
 +    *194.80.204.184  .GPS.            1 u    2   64  377   14.476   30.789  13.018
 +    +121.35.213.162. 17.253.34.253    2 u   46   64  377    5.657   29.604  16.346
 +\\ 
 +\\ 
 +**Set the TimeZone**
 +\\ 
 +\\ 
 +From your servers command line enter the following:
 +\\ 
 +    Date
 +\\ 
 +You will see an output similar to the following:
 +\\ 
 +    Fri Apr 26 06:43:49 UTC 2019
 +\\ 
 +If the Time Zone needs to be changed, use the following:
 +\\ 
 +\\ 
 +<file>
 +cd /etc
 +rm localtime
 +ls /usr/share/zoneinfo/
 +ln -s /usr/share/zoneinfo/[expected_time_zone] localtime (I normally use GMT or UTC)
 +</file>
 +Use Date to re-check the current TimeZone
 +
 +----
 +
 +\\ 
 +\\ 
 +Original Post Here[[https://www.thegeekdiary.com/centos-rhel-7-enable-ntp-to-start-at-boot-after-fresh-install-disable-chrony/]]
 \\  \\ 
 \\  \\ 
wiki/ntp_start_at_boot.1526028352.txt.gz · Last modified: 2023/03/09 22:35 (external edit)