Edit the configuration file for Linux NTP installation and configuration service

Source: Internet
Author: User

Linux NTP is a commonly used software for computer gamers. Then I will study and study Linux NTP in depth. Here I will discuss with you how to use Linux NTP, hoping to help you. About Time Service

/Etc/Linux NTP. conf System-config-date Network Time Protocol (Linux NTP, Network Time Protocol) is used to synchronize all of its client clock services. The Linux NTP server synchronizes the clock of the local system with a public Linux NTP server and then serves as a time host so that all clients on the local network can synchronize the clock.

The biggest benefit of clock synchronization is the data in the log files on the relevant system. If you use the central log host to centrally manage logs in the network, the log results will better reflect the real situation. In a network that synchronizes the clock, the centralized performance monitoring and service monitoring systems can reflect system information in real time, and the system administrator can quickly detect and solve system errors.

Install and configure the Linux NTP service

The following describes the simple configuration of the Linux NTP server: Generally, the Linux release will contain the Linux NTP package. If your system is not installed, run the rpm command to install the package, the following uses the fedora core 6 system as an example to configure a time server:

 
 
  1. [root@supersun.biz root]# rpm -ivh Linux NTP-4.2.2p1-3.i386.rpm   
  2. warning: Linux NTP-4.2.2p1-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e  
  3. Preparing... ########################################### [100%]  
  4. 1:Linux NTP ########################################### [100%] 

Edit the configuration file/etc/Linux NTP. conf

 
 
  1. restrict default nomodify notrap noquery  
  2. restrict 127.0.0.1   
  3. restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap  
  4. restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap  
  5. server 0.asia.pool.Linux NTP.org  
  6. server 1.asia.pool.Linux NTP.org  
  7. server 2.asia.pool.Linux NTP.org  
  8. server 3.asia.pool.Linux NTP.org  
  9. server 127.127.1.0  
  10. fudge 127.127.1.0 stratum 10 


The ITALIC part is the part I added. It sets the Intranet address of the two network segments of the time server and the external time server. Now we will give a brief explanation of the configuration: the first line of restrict, default defines the default access rules, nomodify prohibits remote hosts from modifying the local server configuration, notrap rejects special Linux NTPdq To Capture messages, noquery rejects the btodq/Linux NTPdc query. The query here is the server status query ).

The last two lines of the configuration file are used to provide the time service for the client at the local time when the server is out of contact with the public time server. Port Linux NTP uses udp protocol. Remember to open port 123.

Start Linux NTPD

Start the Linux NTPd daemon: configure the service Linux NTPd start client to run periodic tasks as root: [root @ supersun root] # crontab-e

Add the following content and update the time every 15 minutes: */15 ***** Linux NTPdate Linux NTP. supersun. the Linux NTPdate command in biz is included in the Linux NTP package. Check whether the system is installed.

  1. Linux Kernel super privilege user root
  2. Chatting about a Linux stock Software
  3. Linux File System organization structure description analysis structure
  4. Reasons for choosing the path to Linux Authentication
  5. Red Hat Linux is well-known

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.