五月开心播播网_国内精品伊人久久久久影院对白_亚洲精品高清视频_国产精品激情_68精品久久久久久欧美_四虎免费av_97精品在线视频_欧美知名女优

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

centos7安裝chronyd服務方式

瀏覽:2020日期: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| 日韩精品人妻中文字幕| 日本午夜精品电影| 欧美日韩免费在线视频| 美女精品在线| mm1313亚洲国产精品美女| 国产女同91疯狂高潮互磨| 97免费在线观看视频| 成年人二级毛片| 国产xxxxxxxxx| 精品人妻一区二区三区免费| 亚洲高潮无码久久| 蜜桃视频一区二区在线观看| 在线观看18视频网站| 日本一区二区免费高清视频| 伊人天天久久大香线蕉av色| 一区二区在线高清视频| gogogo高清免费观看在线视频| 国产乱子伦精品视频| 逼特逼视频在线观看| 中文字幕日韩三级片| 人妻丰满熟妇av无码久久洗澡 | 宅男在线一区| 超碰在线亚洲| 首页亚洲中字| 成人在线免费观看91| 欧美三级美国一级| 欧美超碰在线| 激情一区二区| 鲁大师成人一区二区三区| 国产精品―色哟哟| 午夜私人影院久久久久| 欧美视频在线观看免费网址| 欧美中文字幕一区| 欧美成人一区二区三区在线观看| 亚洲成**性毛茸茸| 在线看福利67194| 色与欲影视天天看综合网| 午夜精品在线视频| 成人黄色午夜影院| 欧美性bbwbbwbbwhd| 亚洲一卡二卡三卡| 国产视频一视频二| 波多野结衣三级视频| 亚洲v国产v欧美v久久久久久| 黄色a一级视频| jizz中国女人| 99re这里有精品| 美女视频免费观看网站在线| 国产黄色片在线播放| 丁香花高清在线观看完整版| av国产精品| 欧美超碰在线| **性色生活片久久毛片| 欧美色视频在线| 国产精品私拍pans大尺度在线| 狠狠综合久久av| 青青青免费在线| 亚洲成年人av| 蜜臀久久久久久999| jizzwww| 无圣光视频在线观看| 成年男女免费视频网站不卡| 激情亚洲另类图片区小说区| 亚洲精品免费观看| 久久夜色精品国产欧美乱极品| 亚洲人成7777| 亚洲黄色免费三级| 国产精品国产福利国产秒拍| 日韩欧美三级电影| 亚洲三级在线观看视频| 成人一级黄色大片| 免费看国产片在线观看| 9i精品一二三区| 91在线一区| 国产欧美一区二区精品性| 欧美精品一二三四| 欧美激情乱人伦| 深田咏美在线x99av| 91丨porny丨九色| 久久午夜免费视频| 中文字幕第12页| 欧美高清免费| 久久九九国产| 精品国产sm最大网站| 亚洲精品国产精品国自产| 性生活一级大片| 久热免费在线视频| 国产在线视频网址| 久久国产精品色av免费看| 国产精品女主播av| 国产欧美一区二区三区久久| 日本黄色三级大片| 激情五月婷婷小说| 曰本大片免费观看视频| 深夜国产在线播放| 99成人超碰| 欧美日韩在线播放一区| 欧美一级二级三级九九九| 日韩美女视频网站| 欧美日韩国产亚洲沙发| 国产精品18hdxxxⅹ在线| 国产另类ts人妖一区二区| 色婷婷久久久综合中文字幕 | 无吗不卡中文字幕| 欧美成人激情视频| 无遮挡亚洲一区| 波多野结衣高清在线| 成人福利视频在| 国产精品99久久免费| 精品无码三级在线观看视频| 欧美色手机在线观看| 亚洲人成网站在线观看播放| 337p粉嫩色噜噜噜大肥臀| 久久av色综合| 久久福利毛片| 深夜精品寂寞黄网站在线观看| 涩涩涩999| 国产ts人妖调教重口男| 最新日韩一区| 国产不卡免费视频| 亚洲国产日韩精品在线| 成年人视频在线免费| 国产精品特级毛片一区二区三区| 永久免费在线观看| 日韩欧美精品| 一区二区三区中文在线观看| 91精品国产免费久久久久久| 成年网站在线播放| 日韩性xxxx| 国产日韩一区二区三免费高清| 五月激情综合婷婷| 国产九色porny| 少妇一级淫片日本| 国产资源在线看| 国产成人av一区| 成人午夜在线影院| 综合久久中文字幕| 国产精品成人3p一区二区三区| 色吊一区二区三区| 精品午夜一区二区三区| 国产麻豆免费视频| 亚洲专区**| 一区二区三区高清在线| 国产精品久久9| 无码人妻丰满熟妇奶水区码| 97电影在线| 中文一区一区三区高中清不卡| 欧美黄网免费在线观看| 99热精品免费| 欧美视频综合| 久久婷婷丁香| 一区二区在线视频| 国产真人做爰视频免费| 色成人亚洲网| 欧美在线亚洲| 精品电影一区二区| 在线免费播放av| 2019一级黄色毛片免费看网| 麻豆精品久久精品色综合| 亚洲区中文字幕| 日本高清久久久| 尤物在线视频观看| 久久裸体视频| 亚洲最大福利视频| 日韩免费不卡视频| 亚洲高清国产拍精品26u| 1024成人网色www| 韩国无码av片在线观看网站| 天堂视频在线观看免费| 国产在视频线精品视频www666| 欧美三级视频在线| 精品国产aⅴ一区二区三区东京热| 邻居大乳一区二区三区| 国产精品成人免费在线| 精品蜜桃一区二区三区| 国产一级片儿| 久久高清免费| 韩国福利视频一区| 成人做爰视频网站| 久久精品女人天堂av免费观看 | 欧美一级大胆视频| 欧美手机在线观看| 99er精品视频| 中文字幕亚洲色图| 欧美深性狂猛ⅹxxx深喉 | 18岁成年人网站| 亚洲不卡av不卡一区二区| 亚洲精品国产精品国产自| 国产精品麻豆免费版现看视频| 国产三级视频在线| 一本大道av一区二区在线播放 | 美女黄色网址| 国内精品久久久久久久影视麻豆 | 国产精品不卡一区| 手机av在线免费| 麻豆免费在线| 亚洲午夜电影在线| 大j8黑人w巨大888a片| 国产色a在线|