Build a Linux time server

Source: Internet
Author: User

Boring tonight, learning to build a Linux time server, in fact, quite simple, this article is mainly a summary of my, we can learn from it.

Required Packages:NTP


Configure Server-side

1, first check whether the NTP package is installed, check the command Rpm-qa | grep ntp or yum list | grep NTP

2, confirm the installation of the NTP package, to set up a local time server, only need to modify the/etc/ntp.conf file in a few simple configuration can be, vi/etc/ntp.conf


Just add on who can send a request to this server to update the time.

Restrict 192.168.100.0 mask 255.255.255.0 nomodify (allow intranet communication)

Restrict 0.0.0.0 mask 0.0.0.0 nomodify notrap noquery notrust (block other IP over update time)

  

Description: About the Permission settings section

The setting of the permission is mainly set by the Restrict parameter, the main syntax is:

restrict IP address or domain name mask subnet mask option

Where IP can be an IP address or default, default means all IP.

Common options are as follows:

  Ignore: Indicates that the NTP request packet is forbidden to enter

  nomodify: Indicates that other computers are prevented from changing the native NTP service settings, but can be used through this NTP server for network

  notrust: Disallowed, so unauthenticated NTP packets are not entered

Noquery: Indicates that other computers are prevented from querying the state of the native NTP service

If no option is set, it means that the computer (or network) has no restrictions


As for the server time update, the configuration file has been written,

Server 0.pool.ntp.org
Server 1.pool.ntp.org
Server 2.pool.ntp.org


Here there is no need to modify, as to the specific situation, today is too tired, to write a specific tomorrow.


Configuration of the Client

The client wants to synchronize time, only need to use a command to be able to ntpdate IP .


Concrete things, add again tomorrow.

This article is from the "focus on Java,linux Technology" blog, please be sure to keep this source http://wuqinglong.blog.51cto.com/9087037/1618328

Build a Linux time server

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.