成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_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国内精品久久久久久久
国产在线乱码一区二区三区| 99热这里只有精品8| 麻豆精品国产传媒mv男同 | 亚洲一区在线电影| 综合激情成人伊人| 亚洲欧美激情视频在线观看一区二区三区 | 亚洲欧美一区二区原创| 99re成人精品视频| av电影在线观看一区| 成人app在线观看| 色综合一个色综合亚洲| 欧美国产综合| 亚洲精品日韩精品| 麻豆精品视频| 欧美网站一区二区| 日韩欧美视频一区| 国产日韩精品久久久| 中文字幕永久在线不卡| 一区二区三区四区蜜桃| 午夜激情综合网| 精品一区二区三区久久| 国产高清成人在线| 99久久综合国产精品| 99久久久无码国产精品| 国产精品v欧美精品v日韩精品| 黄色av一区| 久久激情婷婷| 日韩一级黄色大片| 国产精品久久久一本精品| 亚洲一区二区三区视频在线播放 | 国产欧美日韩在线播放| 欧美综合一区二区三区| 日韩视频在线永久播放| 欧美国产日韩一二三区| 亚洲成人精品一区二区| 国模少妇一区二区三区| 91免费看视频| 久久狠狠婷婷| 欧美xxxx老人做受| 亚洲免费大片在线观看| 久久国产福利国产秒拍| 欧美一区精品| 久久久久一区| 国产网站一区二区| 日韩亚洲国产精品| 666欧美在线视频| 亚洲免费在线看| 国产一区在线精品| 黄色成人在线网站| 6080国产精品一区二区| 亚洲欧洲国产专区| 国产剧情av麻豆香蕉精品| 国产一区观看| 欧美精品日韩精品| 一区二区三区国产豹纹内裤在线| 精久久久久久久久久久| 精品动漫一区| 日韩片之四级片| 亚洲一区二区三区精品在线| 不卡高清视频专区| 91久久精品午夜一区二区| 国产精品婷婷午夜在线观看| 捆绑调教一区二区三区| 亚洲免费不卡| 国产日韩欧美不卡在线| 国产资源精品在线观看| 日韩亚洲不卡在线| 欧美高清一级片在线观看| 国内外精品视频| 亚洲一区精品视频| 中文字幕在线不卡一区| 成人黄色在线看| 欧美日韩一区成人| 亚洲国产婷婷综合在线精品| 91免费看`日韩一区二区| 欧美美女黄视频| 免费成人在线播放| 午夜在线精品| 亚洲美女屁股眼交| 午夜欧美精品| 精品av综合导航| 国产黄色91视频| 欧美日本国产一区| 免费的成人av| 久久国产精品久久w女人spa| 国产精品久久久久久久久免费桃花| 国产精品综合二区| 欧美日韩久久久一区| 美日韩一区二区| 色妹子一区二区| 亚洲成人免费电影| 欧美亚洲在线| 午夜精品久久久久久久久久久| 亚洲美女色禁图| 亚洲综合成人网| 一区二区三区偷拍| 亚洲人精品一区| 99精品免费| 亚洲综合999| 美女国产一区| 天天av天天翘天天综合网色鬼国产| 91久久亚洲| 亚洲精品v日韩精品| 激情视频一区二区三区| 国产精品久久久久久久久免费丝袜 | 91麻豆精品一区二区三区| 91精品在线免费| 成人免费av网站| 日韩精品在线一区| 99精品视频免费在线观看| 女同一区二区| 国产精品美女一区二区在线观看| 欧美日韩国产综合视频在线| 亚洲国产精品99久久久久久久久| 欧美日韩国产亚洲一区| 亚洲欧洲国产日韩| 亚洲一区日韩在线| 麻豆精品一区二区av白丝在线| 欧美亚洲综合另类| 成人一区在线观看| 国产精品美女www爽爽爽| 亚洲精品一区二区三区樱花| 亚洲gay无套男同| 欧美午夜不卡视频| 成人小视频免费观看| 国产三区在线成人av| 99re热精品| 美女精品自拍一二三四| 日韩午夜激情电影| 欧美特黄一区| 婷婷久久综合九色国产成人| 欧美午夜精品理论片a级按摩| 国产精品1区2区3区| 日本一区二区视频在线| 亚洲一区二区高清视频| 国产综合久久久久久鬼色| 久久久久久久久久美女| 99国内精品| 国产高清不卡二三区| 欧美国产丝袜视频| 色婷婷av一区二区三区大白胸| 国产成人免费在线视频| 综合电影一区二区三区| 欧美日韩中文另类| 欧美日韩一区二区国产| 午夜精品福利一区二区蜜股av| 欧美大度的电影原声| 亚洲国产精品www| 国产一区在线不卡| 自拍偷拍国产亚洲| 欧美疯狂做受xxxx富婆| 精品不卡在线| 国产精品综合久久| 亚洲午夜精品17c| 精品国产1区二区| 色狠狠一区二区| 国产综合网站| 国产精品亚洲人在线观看| 亚洲蜜桃精久久久久久久| 91精品国产全国免费观看| 亚洲精品孕妇| 99re这里只有精品视频首页| 视频一区视频二区中文| 中文字幕乱码亚洲精品一区| 欧美日韩三级在线| 国产日韩精品一区观看| 国产99久久久久| 首页国产欧美日韩丝袜| 国产精品家庭影院| 日韩欧美黄色影院| 欧美在线|欧美| 国产精品久久久一区二区| 波多野结衣中文一区| 免费成人性网站| 亚洲第一精品在线| 国产精品久久久久久久久晋中 | 久久九九国产精品| 欧美一区二区三区在线观看视频| 亚洲一区二区三区精品视频| 欧美成人有码| 不卡区在线中文字幕| 国内久久精品视频| 久久久久久久久久久一区| 一区国产精品| 欧美激情亚洲| www.综合网.com| 国产suv精品一区二区6| 久久99国产精品尤物| 亚洲成人av资源| 亚洲国产中文字幕在线视频综合| 亚洲国产精品黑人久久久| 久久天天做天天爱综合色| 日韩一区二区三区免费观看| 欧美色精品在线视频| 91成人免费电影| 色欧美日韩亚洲| 91国偷自产一区二区三区观看 | 欧美日韩亚洲不卡| 欧美天堂一区二区三区| 一本大道av伊人久久综合|