Build an enterprise-level NTP Time Server

Source: Internet
Author: User

I. Introduction:

Network Time Protocol (NTP) is used to synchronize time between the distributed time server and the client. NTP transmits data based on UDP packets. The UDP port number is 123.

NTP is used to synchronize the clock of all devices in the network, so that the clock of all devices in the network is consistent, so that the devices can provide multiple applications based on the unified time.

If a time error occurs, the server will be down. Therefore, the local system running NTP can accept synchronization from other clock sources and synchronize other clocks as the clock source, and can be synchronized with other devices.

2. Set up a time server (server)

1. Build the environment

Environment: CentOS6.4

Server192.168.126.1

Client192.168.126.2

2. Install NTP yum-yinstall ntp

3. modify the configuration file and add this line of vim/etc/ntp. conf.

Restrict 192.168.126.0255.255.0 nomodify notrap

4. Find the two lines and remove the comments vi/etc/ntp. conf.

# Server127.127.1.0

# Fudge127.127.1.0stratum 10

5. Start the service

Chkconfig -- level 345 ntpon

6. Start the service

/Etc/init. d/ntpd start

7. The firewall must enable port 123 or disable the firewall.

-A input-m state -- state NEW-m tcp-p tcp -- dport 123-jACCEPT

Iii. Client

1. Run the following command to synchronize time with the server:

Manual execution or crontab execution

Manual: ntpdate 192.168.126.1

Crontab-e

0 21 **** ntpdate 192.168.126.1>/root/ntpdate. log 2> & 1

2. View synchronization status ntpq-p

3. enable or disable the firewall on port 123.

-A input-m state -- state NEW-m tcp-p tcp -- dport 123-jACCEPT

CentOS NTP server installation and configuration

NTP servers in Linux

NTP client configurations for multiple operating systems

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.