廊坊建设银行网站,湖南省住房城乡建设厅网站,类似于微博网站怎么做,新余网站开发目录 NTP服务简介
时间管理命令 第一步#xff1a;更改当前主机所在地的时间
方法一#xff1a;使用tzselect命令查询需要的时区
1、使用tzselect命令查询需要的时区
2、添加变量到 ~/.bash_profile 文件中#xff0c;即追加类似的内容#xff1a;
3、重新连接一个…目录 NTP服务简介
时间管理命令 第一步更改当前主机所在地的时间
方法一使用tzselect命令查询需要的时区
1、使用tzselect命令查询需要的时区
2、添加变量到 ~/.bash_profile 文件中即追加类似的内容
3、重新连接一个新会话使用 date -R 查看 方法二使用timedatectl命令更改时区
1、查看当前时区信息
2、列出所有的时区
3、设置时区
4、设置时间
第二步安装chrony时间同步程序
前提
8.0版本以上
确保光盘镜像已连接
1、获取软件包——挂载
2、编辑配置文件
3、安装软件包
4、时间同步
5、访问外网
第三步自定义同步时间服务器 重启chronyd
附录国内常用NTP服务器地址及IP NTP服务简介 NTP是网络时间协议(Network Time Protocol)它是用来同步网络中各个计算机的时间的协议。 虽然服务器内部会通过晶振自动计算时间但是在系统长时间运行下服务器内部时间与实际时间总会有细微的偏差长时间的积累会导致这种偏差越来越大。 在内网架构中有些业务对时间的要求比较严苛这就要求我们内网设备中的时间保持一致而这一点就可以使用NTP服务实现。
时间管理命令
查看命令
说明命令查看当前的时间date -R查看时区ls /usr/share/zoneinfo/查看其他时区的当前时间zdump Hongkong 第一步更改当前主机所在地的时间
方法一使用tzselect命令查询需要的时区 1、使用tzselect命令查询需要的时区
tzselect 2、添加变量到 ~/.bash_profile 文件中即追加类似的内容 [rootlocalhost node1]# vi ~/.bash_profileTZAsia/Shanghai; export TZ 3、重新连接一个新会话使用 date -R 查看 方法二使用timedatectl命令更改时区
1、查看当前时区信息 [rootlocalhost ~]# timedatectl #查看当前时区信息 2、列出所有的时区 [rootlocalhost ~]# timedatectl list-timezones #列出所有的时区 3、设置时区 rootlocalhost ~]# timedatectl set-timezone Asia/Shanghai [rootlocalhost ~]# ll /etc/localtime lrwxrwxrwx. 1 root root 36 Mar 31 14:15 /etc/localtime - ../usr/share/zoneinfo/Asia/Shanghai [rootlocalhost ~]# timedatectl 4、设置时间 [rootlocalhost ~]# timedatectl set-time 2019-10-20 11:40:00 第二步安装chrony时间同步程序
前提 8.0版本以上 确保光盘镜像已连接 1、获取软件包——挂载 [rootlocalhost node1]# mount /dev/sr0 /mnt/ 2、编辑配置文件
客户端和服务端均配置 [rootlocalhost node1]# vim /etc/yum.repos.d/base.repo [BaseOS] nameBaseOS baseurlfile:///mnt/BaseOS gpgcheck0 [AppStream] nameAppStream baseurlfile:///mnt/AppStream gpgcheck0 3、安装软件包
客户端和服务端均安装 [rootlocalhost node1]# dnf install chrony -y 4、时间同步 [rootlocalhost node1]# systemctl restart chronyd 5、访问外网 第三步自定义同步时间服务器 [rootlocalhost node1]# vim /etc/chrony.conf[rootlocalhost node1]# vim /etc/chrony.conf 重启chronyd [rootlocalhost node1]# systemctl restart chronyd 附录国内常用NTP服务器地址及IP
210.72.145.44 (国家授时中心服务器IP地址)
time-a.nist.gov 129.6.15.28 NIST, Gaithersburg, Maryland
time-b.nist.gov 129.6.15.29 NIST, Gaithersburg, Maryland
time-a.timefreq.bldrdoc.gov 132.163.4.101 NIST, Boulder, Colorado
time-b.timefreq.bldrdoc.gov 132.163.4.102 NIST, Boulder, Colorado
time-c.timefreq.bldrdoc.gov 132.163.4.103 NIST, Boulder, Colorado
utcnist.colorado.edu 128.138.140.44 University of Colorado, Boulder
time.nist.gov 192.43.244.18 NCAR, Boulder, Colorado
time-nw.nist.gov 131.107.1.10 Microsoft, Redmond, Washington
nist1.symmetricom.com 69.25.96.13 Symmetricom, San Jose, California
nist1-dc.glassey.com 216.200.93.8 Abovenet, Virginia
nist1-ny.glassey.com 208.184.49.9 Abovenet, New York City
nist1-sj.glassey.com 207.126.98.204 Abovenet, San Jose, California
nist1.aol-ca.truetime.com 207.200.81.113 TrueTime, AOL facility, Sunnyvale, California
nist1.aol-va.truetime.com 64.236.96.53 TrueTime, AOL facility, Virginia
————————————————————————————————————
ntp.sjtu.edu.cn 202.120.2.101 (上海交通大学网络中心NTP服务器地址
s1a.time.edu.cn 北京邮电大学
s1b.time.edu.cn 清华大学
s1c.time.edu.cn 北京大学
s1d.time.edu.cn 东南大学
s1e.time.edu.cn 清华大学
s2a.time.edu.cn 清华大学
s2b.time.edu.cn 清华大学
s2c.time.edu.cn 北京邮电大学
s2d.time.edu.cn 西南地区网络中心
s2e.time.edu.cn 西北地区网络中心
s2f.time.edu.cn 东北地区网络中心
s2g.time.edu.cn 华东南地区网络中心
s2h.time.edu.cn 四川大学网络管理中心
s2j.time.edu.cn 大连理工大学网络中心
s2k.time.edu.cn CERNET桂林主节点
s2m.time.edu.cn 北京大学