s2e

ntp 时间同步

♀尐吖头ヾ 提交于 2021-02-11 16:01:57
NTP 是网络时间协议(Network Time Protocol)的简称,通过 udp 123 端口进行网络时钟同步 一、安装 # 既可做服务端也可做客户端 yum install - y ntp # 开启服务,让其他客户端与本机同步,注意防火墙状态 systemctl start ntpd # 开机自启 systemctl enable ntpd 二、ntp 常用配置 /etc/ntp.conf 一般服务端才需要配置,客户端直接使用命令同步即可 # 记录和上级时间服务器的时间差异 driftfile /var/lib/ntp/ drift # ntp 日志 logfile /var/log/ ntp.log # 日志级别 all event info logconfig all # 设置默认策略,允许同步时间,不允许修改 restrict default nomodify notrap nopeer noquery # 允许本机地址的一切操作, - 6 为 IPV6 restrict 127.0 . 0.1 restrict - 6 :: 1 # 允许网段内客户端连接此服务器同步时间,但是拒绝让他们修改服务器上的时间 restrict 192.168 . 1.0 mask 255.255 . 255.0 nomodify notrap # https: // www

Java题库——Chapter9 String的用法

旧街凉风 提交于 2020-05-02 04:50:11
1)Which code fragment would correctly identify the number of arguments passed via the command line to a Java application, excluding the name of the class that is being invoked? 哪个代码片段可以正确地标识通过命令行传递给Java应用程序的参数的数量,而不包括正在调用的类的名称? A)int count=0; while (!(args[count].equals(""))) count ++; B)int count = args.length - 1; C)int count = args.length; D)int count = 0; while (args[count] != null) count ++; 3)Analyze the following code. class Test { public static void main(String[ ] args) { String s; System.out.println( "s is " + s); } } A)The program compiles and runs fine. B)The program has a runtime

国内常用的NTP时间源同步服务器汇总

Deadly 提交于 2020-04-28 09:22:42
使用以前请先ping相应的域名查看网络是否可达,和相应的访问速度 ntp.ntsc.ac.cn   中国国家授时中心 cn.ntp.org.cn    中国授时 阿里云NTP时间源服务器 ntp1.aliyun.com ntp2.aliyun.com ntp3.aliyun.com ntp4.aliyun.com ntp5.aliyun.com ntp6.aliyun.com ntp7.aliyun.com 国内一些大学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