Linux Time synchronization NTP

Source: Internet
Author: User

Pre-configuration: Turn off the firewall, configure the HOSTS,SSH password-free login

1. Select the standard for synchronization, I am using hadoop002 (set to the current time) as the synchronization standard, hadoop003 (Time is March 2018 21, set with Date-s) and hadoop004 (March 2018 21) with which to keep in sync

See if NTP is installed on the hadoop002

Rpm-qa|grep NTP, if there is no display content stating that NTP is not installed, perform the Yum install ntp-y installation

Next Modify/etc/ntp.conf

Increase

1 Server 127.127.1.02 Fudge 127.127.1.0 stratum 10

2. Modify /etc/sysconfig/ntpd

Add the following content

1 Sync_hwclock=yes

3. Start the NTPD service (default is not turned on)

1 Service ntpd Start 2 chkconfig ntpd on (boot start)

4. Create a scheduled task for hadoop003 and hadoop004 (root, set to 1-minute sync at test time, set to 1 hours after testing, or delete directly)

1 */1 * * * */usr/sbin/ntpdate hadoop002

5. Use date-d today + "%y-%m-%d%T" to observe

Linux Time synchronization NTP

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.