Setup and Configure NTP Server
It's an example to install and Configure NTP server for system clock.
Trích dẫn:
|
[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
Dependencies Resolved
================================================== =========
Package Arch
Version
Repository
Size
================================================== =========
Installing:
ntp i386
4.2.2p1-5.el5
base
1.3 M
Transaction Summary
================================================== =========
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.3 M
Downloading Packages:
(1/1): ntp-4.2.2p1-5.el5. 100% |====================| 1.3 MB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: ntp#################################### [1/1]
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
================================================== ========
ntp1.jst.mfeed.210.173.160.86 2 u 2 64 1 21.227 -475.55 0.001
ntp2.jst.mfeed.210.173.160.86 2 u 1 64 1 21.400 -475.53 0.001
.....
|
|