Linux Server Time Calibration method

Source: Internet
Author: User

  1. First install NTP:
    1 Yum Install -y ntpdate

    Then execute the NTP command:

    1 time. windows.com

    Or:

    1 ntpdate cn.pool.ntp.org

    If you want to be lazy and let the machine automatically calibrate the time, just add the command to cron.

    1 crontab-e2 * */1 * * */sbin/ntpdate cn.pool.ntp.org #每隔一个小时同步一次

    Save to exit.

  2. The server uses NTP update time, often involved in UTC whether the open problem, the time will be open for 8 hours
    Before the following command, a command resolves all previous issues.

    1   -S STDTIME.GOV.HK

    Use Rdate to fetch the time of the STDTIME.GOV.HK server back and then write the hardware

    1   Hwclock-W



    The following is a description of how rdate commands are used

    Feature Description: Displays the date and time of the other host.
    Syntax: rdate [-ps][host name or IP address ...]
    Additional instructions: Execute the rdate instruction, ask the other host for the system time and display it.
    Parameters
    -P Displays the date and time of the remote host.
    -S returns the date and time received from the remote host to the local host's system time.

Linux Server Time Calibration method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.