Time synchronization using NTP in CentOS 7

Source: Internet
Author: User

1. Confirm NTP Package:  # yum install ntp  2, configure time source  # vi /etc/ntp.conf  server pool.ntp.org  #可选择其他优先服务器server  2.cn.pool.ntp.orgserver 1.asia.pool.ntp.orgserver  2.asia.pool.ntp.org #  allows the upper-level time server to proactively modify the native time restrict 2.cn.pool.ntp.org nomodify  Notrap noqueryrestrict 1.asia.pool.ntp.org nomodify notrap noqueryrestrict 2. asia.pool.ntp.org nomodify notrap noqueryserver 127.0.0.1 # local  Clockfudge 127.0.0.1 stratum 10 3, configure whether to provide time service for other PCs  # vi /etc/ntp.conf  Restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap  4, configuring the auto-run time service at boot  # chkconfig ntpd on  5, start or stop time service  # service ntpd start  # service ntpd stop # service ntpd restart  6, verify that the NTP service is running  #  pgrep ntpd  7, initial synchronization # ntpdate -u time.lib.tsinghua.edu.cn 8, confirm the synchronization success # ntpq -p 9, and suggest to modify  /etc/sysconfig/ntpd  Files  # vi /etc/sysconfig/ntpd  SYNC_HWCLOCK=yes   #  Change to  yes ! So the host  BIOS  time will be changed along with the same!    of course, if you want to provide a time service, you must also set the configuration of the iptable firewall accordingly. The CentOS Time service uses the udp 123 port.


For more information, please contact Ding Feng Hu Jiashong
tel.18824258907
qq.2881064155

Time synchronization using NTP in CentOS 7

Related Article

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.