10 Unit Supplement: Time synchronization

Source: Internet
Author: User
Tags chrony

# # # # #4. How to synchronize system time ######

1. Service-side
Yum Install Chrony-y # #安装服务
vim/etc/chrony.conf # #主配置文件
# Allow NTP Client access from the local network.
192.168/16 # #允许谁去同步我的时间

# Serve Time even if not synchronized to any NTP server.
Stratum local #不去同步任何人的时间, time synchronization server level

System Restart Chronyd
Systemctl Stop Firewalld

2. Client
Vim/etc/chrony.conf
3 #server 0.rhel.pool.ntp.org Iburst
4 #server 1.rhel.pool.ntp.org iburst====>server Ntpserverip iburst
5 #server 2.rhel.pool.ntp.org iburst====>
6 #server 3.rhel.pool.ntp.org Iburst

Systemctl Restart Chronyd

Test:
[Email protected] ~]# Chronyc sources-v
Sources = 1

.--Source mode ' ^ ' = server, ' = ' = Peer, ' # ' = local clock.
/.-Source State ' * ' = current synced, ' + ' = combined, '-' = not combined,
| /'? ' = unreachable, ' x ' = time May is in error, ' ~ ' = time too variable.
|| .-xxxx [YYYY] +/-zzzz
|| /xxxx = adjusted offset,
||             LOG2 (Polling interval)-.    | yyyy = measured offset,
||    \            | zzzz = Estimated error.
||           | |
MS NAME/IP address stratum Poll Reach Lastrx Last sample
===============================================================================
^? Bogon 0 0 10y +0ns[+0ns] +/-0ns

# # #5. Timedatectl Command # # #
Timedatectl Status # #显示当前时间信息
Set-time HH:mm:ss # #设定当前时间
Set-timezone # #设定当前时区
SET-LOCAL-RTC 0|1 # #设定是否使用utc时间

This article from "12100661" blog, declined reprint!

10 Unit Supplement: Time synchronization

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.