Linux operations, architecture-Intranet NTP time server

Source: Internet
Author: User

First, the environment

[Email protected] tmp]# cat/etc/redhat-6.9-I10.0. 0.61 172.16. 1.61(intranet)

Second, check whether the service software is installed

[Email protected] tmp]# RPM-QA ntpntp-4.2. 6p5-. 2. x86_64

Third, modify the NTP configuration file

vim/etc/ntp.conf# Restrict default kod nomodify notrap nopeer noqueryRestrictdefaultnomodify#  usePublic servers from the     pool.ntp.org project.# Please consider joining the pool (http:   www.pool.ntp.org/join.html). #server 0. centos.pool.ntp.org iburst#server  1. centos.pool.ntp.org iburst#server  2. centos.pool.ntp.org iburst#server  3  . centos.pool.ntp.org iburst# adds the original unavailable source comment, adding a new time synchronization source server Ntp1.aliyun.comserver time.nist.gov

Iv. Start the NTP service (this server requires an external network)

[Email protected] tmp]#/etc/init.d/ntpd startstarting ntpd:                                             [  OK  ]

Note:

Time is automatically updated after startup

If the original synchronization time task, close, otherwise will be reported as the next error.

Ntpdate[118978]: The NTP socket is on use, exiting

Five, no external network server synchronization time

172.16. 1.61 Ten £ º£ ntpdate[ 21609172.16.  1.610.000652 sec
#时间服务器启动后, it takes a few minutes for the synchronization to take place.
Ntpdate[5687]:for synchronization found

Six, the synchronous command into the scheduled task

[Email protected] ~]# crontab- -10-10*/5172.16. 1.61  >/dev/null2>&1

Linux operations, architecture-Intranet NTP time server

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.