Commit 11e284348f397d46646bf9db2452aba0b10ab482
1 parent
6c7c89c5
Updates 01_basic/ntp.md
Auto commit by GitBook Editor
Showing
1 changed file
with
10 additions
and
1 deletions
01_basic/ntp.md
| ... | ... | @@ -26,12 +26,21 @@ firewall-cmd --reload |
| 26 | 26 | // 与timedatectl关联,如下图: |
| 27 | 27 | timedatectl set-ntp 1 |
| 28 | 28 | |
| 29 | -//---------- linux时间同步(chrony客户端) ----------// | |
| 29 | +//---------- linux时间同步(chrony客户端)centos7 ----------// | |
| 30 | 30 | // 同上安装chrony |
| 31 | 31 | // 防火墙开启ntp服务 |
| 32 | 32 | firewall-cmd --add-service=ntp --permanent |
| 33 | 33 | // /etc/chrony.cnf配置文件,如下图: |
| 34 | 34 | |
| 35 | +//---------- linux时间同步(chrony客户端)centos6 -----------// | |
| 36 | +// 停止ntpd服务,取消开机自启 | |
| 37 | +service ntpd stop | |
| 38 | +chkconfig ntpd off | |
| 39 | +// 添加chronyd服务,开机自启,启动服务 | |
| 40 | +chkconfig --add chronyd | |
| 41 | +chkconfig chronyd on | |
| 42 | +service chronyd start | |
| 43 | +// 配置同上 | |
| 35 | 44 | |
| 36 | 45 | ``` |
| 37 | 46 | ... | ... |