How to use NTP server under Linux system?

  
                

The NTP server under Linux refers to the network time synchronization protocol, which is used to synchronize network time and time in the Linux system, making Linux time more accurate. Here's how to use the NTP server under Linux.

a, ntp configuration file

1. /etc/ntp.conf

The main configuration file NTP services, directory different Linux version of the file where possible It will be different.

2. /usr/share/zoneinfo

Specifies the time setting file for each major time zone. /usr/share/zoneinfo/Asia/Shanghai sets the file for the time zone in mainland China.

3. /etc/sysconfig/clock

Time Zone Settings File

4. /etc/localtime

Local System Time Settings File
>

[root@linuxidc1 ~]# grep -v “^#” /etc/ntp.conf

restrict default kod nomodify notrap nopeer noquery//Deny all operations for the default client< Br>

restrict -6 default kod nomodify notrap nopeer noquery //Setup for ipv6

restrict 127.0.0.1 //Allow all operations on the local address

restrict -6 :: 1

server 0.rhel.pool.ntp.org //Set the upper server to do the synchronous ip address

server 1.rhel.pool.ntp.org

server 2 .rhel.pool.ntp.org

server 127.127.1.0 //local address

fudge 127.127.1.0 stratum 10 //This line is the level of the time server. Set to 0 to be the top level. If you want to update the time to other NTP servers, please don't set it to 0

driftfile /var/lib/ntp/drift //record the last NTP server and upper NTP Time spent on server connection

keys /etc/ntp/keys Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved