Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2353297
  • 博文数量: 609
  • 博客积分: 10061
  • 博客等级: 上将
  • 技术积分: 5920
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-25 08:30
文章分类

全部博文(609)

文章存档

2010年(13)

2009年(39)

2008年(558)

我的朋友

分类: LINUX

2008-09-13 13:26:09

It's an example to install and Configure NTP server for system clock.

[root@ns ~]#yum -y install ntp
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for ntp to pack into transaction set.
ntp-4.2.2p1-5.el5.i386.rp 100% |========================| 36 kB 00:00
---> Package ntp.i386 0:4.2.2p1-5.el5 set to be updated
--> Running transaction check
************略***********************
Installed: ntp.i386 0:4.2.2p1-5.el5
Complete!
[root@ns ~]# mv /etc/ntp.conf /etc/ntp.conf.bk

[root@ns ~]# vi /etc/ntp.conf
server ntp1.jst.mfeed.ad.jp
// Set servers for synchronizing
server ntp2.jst.mfeed.ad.jp
server ntp3.jst.mfeed.ad.jp

[root@ns ~]# /etc/rc.d/init.d/ntpd start

Starting ntpd: [ OK ]

[root@ns ~]# chkconfig ntpd on


[root@ns ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 222.73.214.1    209.81.9.7       2 u    2   64    1   86.408  -128.22   0.001
 61.129.66.79    209.81.9.7       2 u    1   64    1   68.595  -120.18   0.001
 LOCAL(0)        .LOCL.          10 l    -   64    0    0.000    0.000   0.001

[root@localhost etc]#
阅读(931) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~