NTP Server for Linux experiments

Source: Internet
Author: User

One, NTP server (ip:192.168.1.101)

    1. Installation: Yum install-y NTP

    2. Firewall allowed: iptables-a input-i $EXTIF-P udp-s 192.168.1.0/24--dport 123-j ACCEPT

    3. Configuration: vim/etc/ntp.conf

      Restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

      Server before # Remove

    4. Start:/ETC/INIT.D/NTPD start

      Chkconfig ntpd on

    5. Observation: Ntpq-p or Ntpstat

Second, NTP client

    1. Installation: Yum install-y ntpdate

    2. Manual sync First: Ntpdate 192.168.1.101 (wrong: ntpdate-d 192.168.1.101)

    3. Configuration: vim/etc/ntp.conf

      Server 192.168.1.101

    4. Start:/ETC/INIT.D/NTPD start

      Chkconfig ntpd on

    5. Write Crontab-e

      Add a row to synchronize with the time synchronization server 6:10 daily

      * * * */usr/sbin/ntpdate ntp-server IP >>/usr/local/logs/crontab/ntpdate.log

Attention:

    1. Self-built NTP time cannot be too much worse than external server time

    2. Firewall to allow UDP port 123

    3. Need to wait a few minutes to take effect

    4. The time error between server and client cannot be greater than 1000s

NTP Server for Linux experiments

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.