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]#
阅读(972) | 评论(0) | 转发(0) |