Build an NTP server in linux

Source: Internet
Author: User
Building an NTP server in linux has recently set up an NTP time server. next we will record the entire process for others, even if it is simple. Step 1: Download the .tar.gz package of the ntptime server to linux and decompress it to your favorite directory... information on how to build an NTP server in linux has recently set up an NTP time server. next we will record the entire process for others, even if it is very simple. Step 1: Download the .tar.gz package of the ntptime server to linux and decompress it to your favorite directory 2. /configure, and then make 3. in this way, there are folders named/ntpd and/ntpq and/ntpdate in many folders, and the compiled commands are provided here, it can be used directly. Many people think that make install is unnecessary. 4. a simple NTP server requires an ntpd command, an ntp. conf configuration file, and another ntpq command. if you want to create a client, you must use the ntpdate command. 5. the configuration file should be included in/etc/ntp. conf. if the configuration file is used as the server, you can write it like this. see the bottom. Problem: between two linux systems, sometimes #. /ntpd, # ps-e can see the process, but the client is not connected, although you can ping, and finally found that it is the same as what google said, pay attention to time, some NTP servers can only work normally for an hour (said laruence). If your server is still difficult to use, wait for a while and try again. My configuration file: # For more information about this file, see the man pages # ntp. conf (5), ntp_acc (5), ntp_auth (5), ntp_clock (5), ntp_misc (5), ntp_mon (5 ). driftfile/var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default nomodifyrestrict-6 default nomodify # Permit all access over the loopback interface. this cocould # be tightened as well, but to do so wocould effect some of # the administrative functions. restrict 127.0.0.1 restrict-6: 1 # Hosts on local network are less restricted. # restrict 192.168.1.0 mask limit 255.0 nomodify notrap # Use public servers from the pool.ntp.org project. # Please consider joining the pool ( http://www.pool.ntp.org/join.html ). # Server route iburst # broadcast 192.168.1.255 autokey # broadcast server # broadcastclient # broadcast client # broadcast route autokey # multicast server # multicastclient 224.0.1.1 client # manycastserver 239.424254.254 # manycast server # manycastclient 239.424254.254 autokey # manycast client # Undisciplined Local Clock. this is a fake driver intended for backup # and when no outside source of synchronized time is available. server 127.127.1.0 # local clockfudge 127.127.1.0 stratum 10 # Enable public key cryptography. # cryptoincludefile/etc/ntp/crypto/pw # Key file containing the keys and key identifiers used when operating # with your Ric key cryptography. keys/etc/ntp/keys # Specify the key identifiers which are trusted. # trustedkey 4 8 42 # Specify the key identifier to use with the ntpdc utility. # requestkey 8 # Specify the key identifier to use with the ntpq utility. # controlkey 8 # Enable writing of statistics records. # statistics clockstats cryptostats loopstats peerstats

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.