How to configure NTP client

this is my some tips when i configure ntp server on fedora OS. 

 

Step one:

You need make sure your OS have installed NTP page, you can use the command:

rpm –q ntp

To make sure weather ntp package has been installed, if not you will install NTP package

yum install ntpdate

 

Step two:

You need to change some configure in /etc/ntp.conf, as a ntp client we need only focus on this format sentence to configure permission as follow:

 

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

restrict 10.239.128.0 mask 255.255.255.0 nomodify notrap

 

after the key word restrict, follows our client machine network segment and mask, for example strago2 and haps is 10.239.128.0

the parameter nomdofiy means client can synchronous NTP server time but can’t modify NTP server time, and the parameter notrap means we don’t offer trap telnet login.

Tips: you can create /etc/ntp.conf only with this two sentence, it works well

 

Step three:

Now, we need to synchronous our machine to NTP server, you can find an available NTP server on Internet, but there will be two questions, first, our NTP protocol 123 port maybe done by our firewall , second, we maybe grant by out router, so we can’t receive date form NTP server.

So the best choose we synchronous Intel’s NTP server, it seems our windows 7 synchronous that server. You can check with windows, start cmd, and

 

net time

it will show our windows synchronous a NTP server, for example SHSCCR201.ccr.crop.intel.com

 

So we can choose SHSCCR201.ccr.corp.intel.com as NTP server, next,

ntpdate  SHSCCR201.ccr.corp.intel.com

 

Step four:

Need to write synchronous time to hardware, use command

hwclock –w

And we need synchronous NTP time often, make sure can adjust regularly, so I need synchronous NTP everyday 8:30 morning.

vi /etc/crontab

Add the tail

30 8 * * * root /usr/sbin/ntpdate SHSCCR201.ccr.corp.intel.com; /sbin/hwclock –w

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值