Centos7配置rdate时间同步服务器

Centos7配置rdate时间同步服务器

𝓓𝓸𝓷 Lv6

rdate配置时间同步服务,将本地时间与远程服务器时钟同步

一、服务端安装xinetd
1
[root@server01 ~]# yum install -y xinetd rdate
二、修改time-stream文件

disable = yes 改为 disable = no

1
2
3
4
5
6
[root@server01 ~]# vim /etc/xinetd.d/time-stream
service time
{
# This is for quick on or off of the service
disable = no

三、启动xinetd
1
[root@server01 ~]# systemctl start xinetd
四、设置开机自动启动
1
[root@server01 ~]# systemctl enable xinetd
五、客户端通过rdate访问该机器进行时间同步
1
2
3
4
5
6
7
8
9
10
11
[root@server03 ~]# rdate -s ip

[grid@server03 ~]$ date; ssh server01 date
Sun Jan 16 15:25:16 CST 2022
Sat Jan 15 15:25:18 CST 2022

[root@server03 ~]# rdate -s server01

[grid@server03 ~]$ date; ssh server01 date
Sat Jan 15 15:36:33 CST 2022
Sat Jan 15 15:36:34 CST 2022
  • Title: Centos7配置rdate时间同步服务器
  • Author: 𝓓𝓸𝓷
  • Created at : 2024-07-06 15:28:40
  • Updated at : 2024-07-20 05:15:41
  • Link: https://www.zhangdong.me/centos-time-synchronization.html
  • License: This work is licensed under CC BY-NC-SA 4.0.
评论