自己做的网站实现扫码跳转sem扫描电镜
1、手动修改时区
CST可以为如下4个不同的时区的缩写:
美国中部时间:Central Standard Time (USA) UT-6:00
澳大利亚中部时间:Central Standard Time (Australia) UT+9:30
中国标准时间:China Standard Time UT+8:00
古巴标准时间:Cuba Standard Time UT-4:00
小结:
UTC:世界标准时间
CST:中国标准时间。
CST = UTC + 8(小时)
查看系统时间:
[root@localhost ~]# datehi
Mon Oct 12 14:23:53 HKT 2020修改时区为CST:
[root@localhost ~]# timedatectl set-timezone Asia/Shanghai
[root@localhost ~]# date
Mon Oct 12 14:24:20 CST 2020
或者 将时区信息-Asia/Shanghai,生产软链接到/etc/localtime
[root@localhost ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@localhost ~]# ll /etc/localtime
lrwxrwxrwx. 1 root root 35 Oct 12 14:24 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai
2、手动配置时间
[root@localhost ~]# date -s "2024-03-28 12:12:12"
Mon Oct 12 15:12:12 CST 2020
[root@localhost ~]# hwclock -w
3、NTP时间服务同步
ntp服务器与客户端搭建
chrony是linux7开始使用的时间同步服务,系统内置。比ntp更加快捷,简单实际配置中总是出现各种问题,排除时,首先关闭selinux,关闭防火墙。
chrony是两个用来维持计算机系统时钟准确性的程序,这两个程序命名为chronyd和chronyc。
chronyd是一个在系统后台运行的守护进程。他根据网络上其他时间服务器时间来测量本机时间的偏移量从而调整系统时钟。对于孤立系统,用户可以手动周期性的输入正确时间(通过chronyc)。
chronyd决定计算机快慢的比例,并加以纠正。chronyd实现了NTP协议并且可以作为服务器或客户端。
chronyc是用来监控chronyd性能和配置其参数的用户界面。他可以控制本机及其他计算机上运行的chronyd进程。
4、配置NTP服务器
服务端:172.16.2.232
安装服务
# yum install ntp -y
修改配置文件
# vi