成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術文章
文章詳情頁

centos7安裝chronyd服務方式

瀏覽:1788日期:2023-10-01 20:59:26
目錄centos7安裝chronyd服務Centos7使用chronyd進行時鐘同步安裝配置文件啟動服務及時區設置驗證服務手動同步時間手動設置時間總結centos7安裝chronyd服務

一、雙節點部署:

ip主機名192.168.100.10controller192.168.100.20compute

二、配置時間同步

1、雙節點安裝chrony服務(這里是使用本地的軟件包進行yum安裝)

[root@controller ~]# yum install -y chrony[root@compute ~]# yum install -y chrony

2、controller修改chrony服務配置文件(在/etc/chrony.conf目錄下)

[root@controller ~]# vi /etc/chrony.conf # Use public 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 //添加#號server controller iburst //添加這一行# Record the rate at which the system clock gains/losses time.driftfile /var/lib/chrony/drift# Allow the system clock to be stepped in the first three updates# if its offset is larger than 1 second.makestep 1.0 3# Enable kernel synchronization of the real-time clock (RTC).rtcsync# Enable hardware timestamping on all interfaces that support it.#hwtimestamp *# Increase the minimum number of selectable sources required to adjust# the system clock.#minsources 2# Allow NTP client access from local network.allow all //去掉#號# Serve time even if not synchronized to a time source.local stratum 10 //去掉#號# Specify file containing keys for NTP authentication.#keyfile /etc/chrony.keys# Specify directory for log files.logdir /var/log/chrony# Select which information is logged.#log measurements statistics tracking

3、compute 修改chrony配置文件

[root@compute ~]# vi /etc/chrony.conf # Use public 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 iburstserver 192.168.100.10 iburst //添加這一行# Record the rate at which the system clock gains/losses time.driftfile /var/lib/chrony/drift# Allow the system clock to be stepped in the first three updates# if its offset is larger than 1 second.makestep 1.0 3# Enable kernel synchronization of the real-time clock (RTC).rtcsync# Enable hardware timestamping on all interfaces that support it.#hwtimestamp *# Increase the minimum number of selectable sources required to adjust# the system clock.#minsources 2# Allow NTP client access from local network.#allow 192.168.0.0/16# Serve time even if not synchronized to a time source.#local stratum 10# Specify file containing keys for NTP authentication.#keyfile /etc/chrony.keys# Specify directory for log files.logdir /var/log/chrony# Select which information is logged.#log measurements statistics tracking

4、雙節點重啟服務,并設置開機自啟

[root@controller ~]# systemctl restart chronyd && systemctl enable chronyd[root@compute ~]# systemctl restart chronyd && systemctl enable chronyd

5、controller開啟ntp同步

[root@controller ~]# timedatectl set-ntp true

6、雙節點執行chronyc sources命令,結果中存在以^*開頭的行,則同步成功

[root@controller ~]# chronyc sources210 Number of sources = 1MS Name/IP address Stratum Poll Reach LastRx Last sample ===============================================================================^* controller 10 6 377 27 +186ns[-8404ns] +/- 17us[root@compute ~]# chronyc sources210 Number of sources = 1MS Name/IP address Stratum Poll Reach LastRx Last sample ===============================================================================^* controller 10 6 17 34 -4280ns[ -13us] +/- 328usCentos7使用chronyd進行時鐘同步

最近要做阿里云遷移 IDC 機房,整理下 Linux 運維基線,簡單記錄,以備后用~

安裝# 默認已經安裝$ yum install -y chrony配置文件$ cat /etc/chrony.conf# Use public servers from the pool.ntp.org project.# Please consider joining the pool (http://www.pool.ntp.org/join.html).# 國家服務器server 0.cn.pool.ntp.orgserver 1.cn.pool.ntp.orgserver 2.cn.pool.ntp.orgserver 3.cn.pool.ntp.org# 阿里server ntp.aliyun.com# 騰訊server time1.cloud.tencent.comserver time2.cloud.tencent.comserver time3.cloud.tencent.comserver time4.cloud.tencent.comserver time5.cloud.tencent.com# 蘋果server time.asia.apple.com# 微軟server time.windows.com# 其他server cn.ntp.org.cn# Record the rate at which the system clock gains/losses time.driftfile /var/lib/chrony/drift# Allow the system clock to be stepped in the first three updates# if its offset is larger than 1 second.makestep 1.0 3# Enable kernel synchronization of the real-time clock (RTC).rtcsync# Enable hardware timestamping on all interfaces that support it.#hwtimestamp *# Increase the minimum number of selectable sources required to adjust# the system clock.#minsources 2# Allow NTP client access from local network.#allow 192.168.0.0/16# Serve time even if not synchronized to a time source.#local stratum 10# Specify file containing keys for NTP authentication.#keyfile /etc/chrony.keys# Specify directory for log files.logdir /var/log/chrony# Select which information is logged.#log measurements statistics tracking啟動服務及時區設置# 啟動服務$ systemctl start chronyd# 開機啟動$ systemctl enable chronyd# 查看當前狀態$ systemctl status chronyd# 查看亞洲時區$ timedatectl list-timezones | grep Asia# 設置時區$ timedatectl set-timezone Asia/Shanghai驗證服務# 查看現有的時間服務器$ chronyc sources -v# 查看時間服務器狀態$ chronyc sourcestats -v# 顯示時鐘同步相關參數$ chronyc tracking# 查看當前時區及時間$ timedatectl?手動同步時間# 使用 ntpdate 同步時間$ ntpdate ntp.aliyun.com# chronyd 未啟動時,如下命令同步時間$ chronyd -q 'server pool.ntp.org iburst'# chronyd 啟動時,使用如下命令同步時間$ chronyc -a 'burst 4/4' && sleep 10 && chronyc -a makestep手動設置時間# date 設置時間$ date -s '2021-06-03 19:00:00'# 關閉 ntp 同步后,才可以使用 timedatectl 進行時間設置$ timedatectl set-ntp false# 設置日期和時間$ timedatectl set-time '2021-06-03 19:00:00'# 設置日期$ timedatectl set-time '2021-06-03'# 設置時間$ timedatectl set-time '19:00:00'# 設置完成后,再開啟$ timedatectl set-ntp true總結

以上為個人經驗,希望能給大家一個參考,也希望大家多多支持好吧啦網。

標簽: Linux
成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久
亚洲激情第一区| 中文一区二区完整视频在线观看| 欧美一二三四在线| 在线播放一区| 亚洲第一主播视频| 久久久久久电影| 色8久久精品久久久久久蜜| 国模吧视频一区| 成人一区二区三区中文字幕| 亚洲国产中文字幕| 中文字幕在线不卡国产视频| 欧美一区二区三区免费在线看| 99在线|亚洲一区二区| 国产精品一区二区三区99| 亚洲人成网站精品片在线观看| 91精品国产综合久久久久久漫画| 久久久精品网| 国产精品普通话对白| 精品999网站| 99久久er热在这里只有精品15| 九九热在线视频观看这里只有精品| 一区二区三区**美女毛片| 中文字幕av不卡| 中国av一区二区三区| 久久久久久久久免费| xnxx国产精品| 久久先锋影音av| 久久久精品tv| 中文欧美字幕免费| 欧美高清一级片在线观看| 欧美—级在线免费片| 26uuu国产一区二区三区| 欧美一区二区三区在线视频| 欧美日韩成人综合天天影院| 一本大道久久a久久综合| 久久精品女人天堂| 亚洲影院免费| 午夜一区二区三区不卡视频| 亚洲专区欧美专区| 久久久久久婷| 玖玖玖国产精品| 在线观看国产精品网站| 欧美视频在线观看一区二区| 欧美喷潮久久久xxxxx| 91精品国产欧美一区二区18 | 欧美午夜影院一区| 色噜噜夜夜夜综合网| 老鸭窝毛片一区二区三区| 亚洲一区二区三区免费观看| 日本高清无吗v一区| 欧美日韩精品一区二区天天拍小说| 欧美浪妇xxxx高跟鞋交| 欧美成人高清电影在线| 日本一区二区电影| 亚洲精品国产第一综合99久久| 亚洲自拍欧美精品| 久久精品国产在热久久| 国产乱理伦片在线观看夜一区| 97se亚洲国产综合自在线| 国内一区二区三区| 免费视频一区| 91精品在线免费| 久久久久高清精品| 亚洲一区二区五区| 国产中文字幕一区| 91尤物视频在线观看| aa成人免费视频| 欧美精品久久99| 欧美激情一区二区三区蜜桃视频| 亚洲国产欧美日韩另类综合| 国产精品一区二区在线观看不卡 | 欧美精品一区二区三区一线天视频| 国产精品天美传媒| 亚洲大型综合色站| 波多野结衣在线aⅴ中文字幕不卡| 亚洲国产欧美国产综合一区| 欧美日韩国产高清一区二区| 亚洲视频在线一区二区| 国产米奇在线777精品观看| 亚洲电影成人| 欧美一区二区视频免费观看| 亚洲你懂的在线视频| 激情五月激情综合网| 精品动漫3d一区二区三区免费版| 欧美吻胸吃奶大尺度电影| 国产亚洲精品久| 免费看日韩精品| 国内精品福利| 欧美日韩免费电影| 亚洲人成网站在线| 91亚洲大成网污www| 日本韩国欧美国产| 亚洲欧美日韩国产手机在线| 高清免费成人av| 久久久精品网| 亚洲欧洲三级电影| 99久久精品久久久久久清纯| 日本精品裸体写真集在线观看| 国产精品黄色在线观看| 成人午夜在线免费| 欧美色偷偷大香| 亚洲综合在线电影| 91麻豆国产精品久久| 美女成人午夜| 亚洲精品一卡二卡| 欧美日本亚洲韩国国产| 欧美影院一区二区| 亚洲成a人v欧美综合天堂下载 | 日本高清视频一区二区| 黄色欧美成人| 韩国v欧美v亚洲v日本v| 亚洲精品中文在线| 久久久91精品国产一区二区精品| 久久伊人亚洲| 欧美日本一区二区高清播放视频| 韩国女主播一区| 亚洲国产毛片aaaaa无费看| 精品久久久久一区二区国产| 在线观看国产91| 99伊人成综合| 欧美/亚洲一区| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲精品国产高清久久伦理二区| 久久蜜桃av一区二区天堂| 欧美日韩精品二区第二页| 亚洲免费影视| 激情欧美日韩一区| 99精品在线免费| 国产综合成人久久大片91| 亚洲一二三四在线| 国产精品国产自产拍高清av| 免费观看一级欧美片| 99综合精品| 亚洲一区二区av在线| 国产精品久久九九| 亚洲日本丝袜连裤袜办公室| 一区在线观看| 一区二区三区在线视频播放| 在线观看成人av| 亚洲一区二区综合| 亚洲免费不卡| 在线日本成人| 亚洲欧美二区三区| 亚洲区欧美区| 综合电影一区二区三区 | 欧美一站二站| 日本一区二区在线不卡| 欧美bbbxxxxx| 亚洲免费观看高清完整| 亚洲人体一区| 亚洲一区二区不卡免费| 久久电影一区| 蜜臀av一区二区在线观看| 久久青青草综合| 婷婷国产在线综合| 欧美日本高清视频在线观看| 激情综合网av| 欧美日韩高清一区二区不卡| 国产很黄免费观看久久| 日韩午夜激情av| 欧美日本一区二区视频在线观看| 亚洲精品日韩一| 色猫猫国产区一区二在线视频| 美女一区二区在线观看| 欧美一区二区啪啪| 成av人片一区二区| 亚洲视频在线观看一区| 色婷婷久久综合| 岛国精品在线观看| 国产精品精品国产色婷婷| 亚洲欧美日韩国产| 国产乱理伦片在线观看夜一区| 日韩视频不卡中文| 99精品国产一区二区青青牛奶| 午夜视频一区在线观看| 欧美视频在线不卡| 97久久超碰国产精品| 亚洲免费成人av| 欧美夫妻性生活| 亚洲国产精品综合| 寂寞少妇一区二区三区| 久久精品亚洲国产奇米99| 伊人成人网在线看| 五月天欧美精品| 日韩欧美在线综合网| 亚洲一区二区在| 丁香桃色午夜亚洲一区二区三区| 国产婷婷色一区二区三区四区 | 91精品国产91久久久久久一区二区 | 老鸭窝一区二区久久精品| 日韩一区二区精品在线观看| 在线观看的日韩av| 国产揄拍国内精品对白| 亚洲私人黄色宅男| 在线播放欧美女士性生活| 亚洲香蕉伊在人在线观| 精品国产乱码久久久久久影片| 99热免费精品| 成人97人人超碰人人99| 亚洲国产视频在线|