小弟学习当中,在win7的电脑上用虚拟机创建了一个CentOS release 6.8的系统环境,
win7的是能够上网,ip:192.168.1.103
centos系统也是能正常访问外网,ip地址是192.168.1.104
centos系统时间比正常的时间要慢5分钟的样子,特别说明:下面的所有操作都是在防火墙(iptables)关闭的情况下进行:
[root@oldboy6 ~]# service iptables status
iptables: Firewall is not running.
其实我在防火墙里面配置了这个端口的
ntp安装情况如下:
[root@oldboy6 ~]# rpm -qa | grep ntp
ntpdate-4.2.6p5-10.el6.centos.1.x86_64
fontpackages-filesystem-1.41-1.1.el6.noarch
ntp-4.2.6p5-10.el6.centos.1.x86_64
ntp.conf配置情况如下:
[root@oldboy6 ~]# cat /etc/ntp.conf | grep -v "#"
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 202.108.6.95
restrict 202.112.29.82
restrict 110.75.190.198
restrict 115.28.122.198
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.100.0 mask 255.255.255.0 nomodify
server 202.108.6.95 prefer
server 202.112.29.82
server 110.75.190.198
server 115.28.122.198
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
其中server都是能ping通的:
[root@oldboy6 ~]# ping 202.108.6.95
PING 202.108.6.95 (202.108.6.95) 56(84) bytes of data.
64 bytes from 202.108.6.95: icmp_seq=1 ttl=45 time=62.7 ms
启动ntp服务:(这个是因为一直是启动当中)
[root@oldboy6 ~]# service ntpd start
Starting ntpd:
按照网上说的改配置的都配置了,但就是起不来,情况如下:
[root@oldboy6 ~]# netstat -tlunp | grep ntp
udp 0 0 192.168.1.104:123 0.0.0.0:* 2890/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2890/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2890/ntpd
udp 0 0 ::1:123 :::* 2890/ntpd
udp 0 0 fe80::20c:29ff:fec5:5c8d:123 :::* 2890/ntpd
udp 0 0 :::123 :::* 2890/ntpd
[root@oldboy6 ~]# ntpstat
unsynchronised
time server re-starting
polling server every 8 s
[root@oldboy6 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
xk-6-95-a8.bta. .INIT. 16 u - 1024 0 0.000 0.000 0.000
dns1.synet.edu. .INIT. 16 u - 1024 0 0.000 0.000 0.000
time7.aliyun.co .INIT. 16 u - 1024 0 0.000 0.000 0.000
time6.aliyun.co .INIT. 16 u - 1024 0 0.000 0.000 0.000
涨姿势了
这是问题没有解决,怎么涨