linux6 配置ntp客户端,RHEL6下NTP服务器的配置.docx

RHEL6下NTP服务器的配置RHEL6下NTP服务器的配置

RHEL6下NTP服务器的配置??2011-09-06 23:17:50|??分类:redhat6初识 |??标签: |举报 |字号大中小?订阅RHEL6下NTP服务器的配置实验环境:[root@desktop2 ~]# cat /etc/redhat-release?Red Hat Enterprise Linux Server release 6.0 (Santiago)[root@desktop2 ~]# uname -r2.6.32-71.el6.x86_64一、NTP服务的原理1、原理NTP(Network Time Protocol,网络时间协议)是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标准间差小于1毫秒,WAN上几十毫秒),且可介由加密确认的方式来防止恶毒的协议攻击。2、端口UDP 123二、NTP服务的配置1、安装NTP软件包[root@desktop2 ~]# yum -y install ntp2、NTP服务的配置[root@desktop2 ~]# grep -v "^#" /etc/ntp.conf?driftfile /var/lib/ntp/driftrestrict default kodnomodifynotrapnopeernoqueryrestrict 127.0.0.1?restrict -6 ::1restrict 192.168.0.0 mask 255.255.255.0 nomodifynotraprestrict 192.168.1.0 mask 255.255.255.0 nomodifynotrapserver 192.168.0.254server ?127.127.1.0 ? ? # local clockfudge ? 127.127.1.0 stratum 10includefile /etc/ntp/crypto/pwkeys /etc/ntp/keyslogfile /var/log/ntp[root@desktop2 ~]# cat /etc/ntp/step-tickers //当NTP服务启动时,会自动与该文件中的记录的上层NTP服务进行时间校对# List of servers used for initial synchronization.192.168.0.254[root@desktop2 ~]# cat /etc/sysconfig/ntpd //允许BIOS与系统时间同步# Drop root to id 'ntp:ntp' by default.SYNC_HWCLOCK=yesOPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -g"3、启动NTP服务[root@desktop2 ~]# servicentpd start[root@desktop2 ~]# chkconfigntpd on4、NTP的测试[root@desktop2 ~]# ntpstat?synchronised to NTP server (192.168.0.254) at stratum 12 //进行时间校对的NTP服务器? ?time correct to within 958 ms //本地与上层NTP服务器的时间差? ?polling server every 64 s //下次同步时间[root@desktop2 ~]# ntpq -p? ? ?remote ? ? ? ? ? refid ? ? ?st t when poll reach ? delay ? offset ?jitter==============================================================================*instructor.examLOCAL(0) ? ? ? ?11 u ? 26 ? 64 ?377 ? ?0.807 ? ?0.030 ? 0.219?LOCAL(0) ? ? ? ?.LOCL. ? ? ? ? ?10 l ? 27 ? 64 ?377 ? ?0.000 ? ?0.000 ? 0.000???三、客户端的访问1、Windows平台双击任务栏右下角的时钟,选择Internet时间?2、Linux平台?或者ntpdate 192.168.0.2?RHEL 5一、搭建时间同步服务器1、编译安装ntp serverrpm -qa | grepntp若没有找到,则说明没有安装ntp包,从光盘上找到ntp包,使用rpm -Uvhntp***.rpm进行安装2、修改ntp.conf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值