NTP clock synchronization creation process

Source: Internet
Author: User

[Excellent] NTP clock synchronization creation process

 
 

The two host host1 and host2 are used for clock synchronization. host1 is the clock source, host2 is the client, OS Version: v5.1

actions on host1:
1. Edit the/etc/hosts file and add the host2 address.
2. edit/etc/NTP. CONF file, add a line
peer 127.127.1.1
3. run the rcmgr command to edit/etc/rc. config File
#/usr/sbin/rcmgr set xntpd_conf Yes
#/usr/sbin/rcmgr set xntp_serv1 host1
#/usr/sbin/rcmgr set xntp_serv2 host2
#/usr/sbin/rcmgr set xntpd_opts "-Gl"
4. start xntpd daemon
#/sbin/init. d/xntpd start
if this command cannot be started, use the following command
#/sbin/init. d/xntpd-g-C/etc/NTP. conf
5. determine whether NTP Works
#/usr/bin/ntpq-P

Actions on host2:
1. Edit the/etc/hosts file and add the host1 address.
2. Edit the/etc/NTP. conf file and add the following content:
Server host1 Version 3
Server host2 Version 3
3. Run the rcmgr command to edit the/etc/rc. config file.
#/Usr/sbin/rcmgr set xntpd_conf Yes
#/Usr/sbin/rcmgr set xntp_serv1 host1
#/Usr/sbin/rcmgr set xntp_serv2 host2
#/Usr/sbin/rcmgr set xntpd_opts "-Gl"
4. Start xntpd daemon
#/Sbin/init. d/xntpd start
If this command cannot be started, use the following command
#/Sbin/init. d/xntpd-g-C/etc/NTP. conf
5. Check whether NTP works.
#/Usr/bin/ntpq-P

Use NTP-V host1 on host2.

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.