修改时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
环境
CentOS Linux release 7.9.2009 (Core)
时间服务器:192.1.1.1
命令同步
ntpdate 192.1.1.1 # 手工与时间服务器同步
[root@client ~]# ntpdate 192.1.1.1
30 Mar 09:58:00 ntpdate[23254]: step time server 192.1.1.1 offset -0.954192 sec
ntpd服务的方式进行同步
ntpd安装(服务端、客户端都需要)
yum -y install ntp
systemctl enable ntpd # 服务名称ntpd
systemctl start ntpd
# 配置文件
vi /etc/ntp.conf
1.服务器端

本文介绍了在 CentOS7 系统中如何进行时区修改及使用 ntpd 服务进行时间同步的方法,包括服务端和客户端的安装配置步骤,并提供了参考资料链接。
最低0.47元/天 解锁文章
3255

被折叠的 条评论
为什么被折叠?



