• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Automatically Run ntpdate When Starting NTPD in CentOS/RHEL 5

by admin

Question: How to Automatically Run ntpdate When Starting NTPD in CentOS/RHEL 5?

1. By default the file /etc/ntp/step-tickers is empty, to sync the time with ntpdate during the start of ntpd, we need to enter the ip addresses of your time server:

# cat /etc/ntp.conf | grep server
server 192.168.X.1
server 192.168.Y.2
# cat /etc/ntp/step-tickers
192.168.X.1
192.168.Y.2

2. Now we can restart the ntp server.

# /etc/init.d/ntpd restart
Shutting down ntpd:                        [ OK ]
ntpd: Synchronizing with timer server:     [ OK ]
Starting ntpd:                             [ OK ]

ntpd: Synchronizing with timer server: [ OK ], indicates that ntpdate was run during the start of ntpd.

3. When the -x option in /etc/sysconfig/ntpd is used, ntpd will automatically use the time servers configured in /etc/ntp.conf to sync the time when starting even when /etc/ntp/step-tickers is empty.

Filed Under: CentOS/RHEL, CentOS/RHEL 5, Linux

Some more articles you might also be interested in …

  1. “passwd: Module is unknown” – error while changing the password in CentOS/RHEL 6
  2. findfs: command not found
  3. How to verify the integrity of a file with md5 checksum
  4. isoinfo Command Examples in Linux
  5. CentOS / RHE 7 : How to Prevent Users from Using the Last 10 Passwords
  6. “-bash: route: command not found” on CentOS/RHEL 7
  7. Comparing NET-TOOLS V/s IPROUTE Package Commands (ip Vs ifconfig command comparison)
  8. Configuring Remote Logging using rsyslog in CentOS/RHEL
  9. CentOS / RHEL : How to install a specific version of rpm package using YUM
  10. How To Setup UDEV Rules For RAC OCR And Voting Devices on Partitions

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright