Linux NTP time synchronization

Source: Internet
Author: User

One. Time Synchronization server
You can use the database server as a synchronization server
Ntp.conf remains unchanged

Start the service
Service NTPD Start

Set NTPD service self-boot
Chkconfig ntpd on
Check
Chkconfig--list ntpd

Two. Client Configuration
1. Modify the server configuration entry for the ntp.conf.
Comment out any pre-defined server-time-synchronization servers address configurations, such as #server 0.rhel.pool.ntp.org
Add Server 192.168.20.119

2. Stop NTPD Services: Service NTPD stop
cannot be synchronized using the Ntpdate service.

3. The guaranteed time differs from the server time in less than 15 minutes.
Manual synchronization is performed using Ntpdate 192.168.20.119 first.
= = Synchronization Failed
Ntpdate 192.168.20.119
No server suitable for synchronization found
Recommended after 5 minutes; NTP service port is not sealed;

+ = Synchronization Succeeded
Ntpdate 192.168.20.119
15:02:51 ntpdate[10819]: Step time server 192.168.20.119 offset 724.435543 sec

4. Add a Scheduled task
vi/etc/cron.hourly/mydate.sh
Add the following content:
#!/bin/sh
Ntpdate 192.168.20.119

Linux NTP time synchronization

Related Article

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.