Configuring CentOS to use NTP
There are a number of reasons you might want a server to use NTP not the least of which is a desire to synchronize the clocks on multiple systems so that times/dates in logs line up. I finally got around to configuring NTP on our H-Sphere server. The process is pretty simple on CentOS.
First Install the NTP Package on your server as root.
[root@cp ~]# 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 ResolutionDependencies Resolved
=================================================================
Package Arch Version Repository Size
=================================================================
Installing:
ntp i386 4.2.2p1-8.el5.centos.1 base 1.3 MTransaction 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
[root@cp ~]# chkconfig ntpd on
Tell it which NTP server it should update it’s time from
[root@cp ~]# 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
[root@cp ~]# date
Mon Aug 4 12:33:04 EDT 2008
Finally start the service
[root@cp ~]# service ntpd start
Starting ntpd: [ OK ]
Easy as could be. If you set all of your servers to update their time from the same pool server your time will be accurate within two seconds or better. If you update one server to the pool, and tell all the rest to update from your own NTP server time can be even more accurate. I don’t need that level of accuracy and tend to just use the pool.


Save to Browser Favorites
Ask
backflip
blinklist
BlogBookmark
Bloglines
BlogMarks
Blogsvine
BUMPzee!
CiteULike
co.mments
Connotea
del.icio.us
DotNetKicks
Digg
diigo
dropjack.com
dzone
Facebook
Fark
Faves
Feed Me Links
Friendsite
folkd.com
Furl
Google
Hugg
Jeqq
Kaboodle
kirtsy
linkaGoGo
LinksMarker
Ma.gnolia
Mister Wong
Mixx
MySpace
MyWeb
Netvouz
Newsvine
PlugIM
popcurrent
Propeller
Reddit
Rojo
Segnalo
Shoutwire
Simpy
Slashdot
Sphere
Sphinn
Spurl.net
Squidoo
StumbleUpon
Technorati
ThisNext
Webride
Windows Live
Yahoo!
Email This to a Friend
If you like this then please subscribe to the 

If you want edit me? just go to your profile than add description text as many you like. ^_*