Ntp
2016-04-08 22:11
701 查看
yum install ntp
配置文件
/etc/ntp.conf 主配置文件
/usr/share/zoneinfo 所有时区的格式文件
/etc/sysconfig/clock 指定要使用/usr/share/zoneinfo里那个格式文件
/etc/localtime 本地时间的配置文件,复制/usr/share/zoneifo里时区文件就行。
命令:
/bin/date 用来修改时间
/sbin/hwclock Bios 硬件时钟修改
/usr/sbin/ntpd
/usr/sbin/ntpdate 客户端时间校正
/etc/ntp.conf
简单配置:
允许同步的客户端IP段
restrict 192.168.10.0 mask 255.255.255.0 nomodify
将原来主机注销,添加中国授时中心主机,做同步
server cn.ntp.org.cn
启动:
service ntpd start
chkconfig ntpd on
查看UDP端口123
# netstat -tlunp | grep ntp
查看连接:
[root@centos ~]# ntpstat
synchronised to NTP server (115.28.122.198) at stratum 3
time correct to within 4015 ms
polling server every 64 s
[root@centos ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*time6.aliyun.co 10.137.38.86 2 u 57 64 17 61.212 21.790 4.001
客户机同步:
ntpdate [-dv] [NTP IP/hostname]
# ntpdate 192.168.2.34
配置文件
/etc/ntp.conf 主配置文件
/usr/share/zoneinfo 所有时区的格式文件
/etc/sysconfig/clock 指定要使用/usr/share/zoneinfo里那个格式文件
/etc/localtime 本地时间的配置文件,复制/usr/share/zoneifo里时区文件就行。
命令:
/bin/date 用来修改时间
/sbin/hwclock Bios 硬件时钟修改
/usr/sbin/ntpd
/usr/sbin/ntpdate 客户端时间校正
/etc/ntp.conf
简单配置:
允许同步的客户端IP段
restrict 192.168.10.0 mask 255.255.255.0 nomodify
将原来主机注销,添加中国授时中心主机,做同步
server cn.ntp.org.cn
启动:
service ntpd start
chkconfig ntpd on
查看UDP端口123
# netstat -tlunp | grep ntp
查看连接:
[root@centos ~]# ntpstat
synchronised to NTP server (115.28.122.198) at stratum 3
time correct to within 4015 ms
polling server every 64 s
[root@centos ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*time6.aliyun.co 10.137.38.86 2 u 57 64 17 61.212 21.790 4.001
客户机同步:
ntpdate [-dv] [NTP IP/hostname]
# ntpdate 192.168.2.34
相关文章推荐
- MySQL中的integer 数据类型
- java-WEB中的监听器Lisener
- MySQL存储过程
- GUI - Web前端开发框架
- Extjs4.0 最新最全视频教程
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件
- MySQL创建用户及权限控制
- MySQL管理数据表
- linux下mysql添加用户
- mysql procedure
- mysql触发器
- MySQL 备份和恢复策略
- MyEclipse Web Project转Eclipse Dynamic Web Project
- axis备忘
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- MySQL数据的导出、导入(mysql内部命令:mysqldump、mysql)