First Install the NTP Package on your server as root.
# yum install ntp
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* updates: mirrors.liquidweb.com
* addons: pubmirrors.reflected.net
* extras: pubmirrors.reflected.net
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package ntp.i386 0:4.2.2p1-8.el5.centos.1 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=================================================================
Package Arch Version Repository Size
=================================================================
Installing:
ntp i386 4.2.2p1-8.el5.centos.1 base 1.3 M
Transaction Summary
=================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): ntp-4.2.2p1-8.el5. 100% |=========================| 1.3 MB 00:19
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: ntp ######################### [1/1]
Installed: ntp.i386 0:4.2.2p1-8.el5.centos.1
Complete!
Next set it to start automatically on a reboot
# chkconfig ntpd on
Tell it which NTP server it should update it’s time from
# ntpdate pool.ntp.org
4 Aug 12:32:43 ntpdate[9540]: step time server 64.202.112.75 offset 1256.453048 sec
Verify that the Time & Date are correct
# date
Mon Aug 4 12:33:04 EDT 2008
Finally start the service
# service ntpd start
Starting ntpd: [ OK ]
沒有留言:
張貼留言