CentOS 7 Build NTP server

Source: Internet
Author: User

First step to install NTP

Yum Install NTP

Second step, find the closest time synchronization server

Http://www.pool.ntp.org/zone/asia

The third edition of/etc/ntp.conf

Server 127.127.1.0 iburst # Local Clock when the external time server is unavailable, use the native time as the standard for the time service
Fudge 127.127.1.0 Stratum #这个值不能太高0-15, too high will be an error

Fourth Step

Add an IP segment to allow access

Restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap

Fifth Step Configuring the firewall

Firewall-cmd--ADD-SERVICE=NTP--permanent
Firewall-cmd--reload

Sixth step to start the NTP service

Systemctl Enable NTPD Boot

Systemctl Start NTPD

Sytemctl Status NTPD

Seventh Step Verification Service

Ntpq-p



Date-r

Eighth step

Synchronizing Remote Time Services

Ntpdate-q 0.ro.pool.ntp.org 1.ro.pool.ntp.org

Nineth step in the client machine synchronization time

Ntpdate-d-B 192.168.85.20

Problems that you may encounter

1 centos stratum 0, Precision 0, Leap xx, trust no server suitable for synchronization found

This problem is due to the firewall blocking the NTP port, use on buy your firewall-cmd command to solve

2 problems with stratum too high

To modify the value of stratum in/etc/ntp.conf

3 NTP boot does not start the workaround

This problem is often due to the 123 ports of the NPT service being caused by other service occupancy, which is typically chronyd

Disabling this service can

Systemctl Disable Chronyd

Build an NTP server for CentOS 7

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.