Time sync server <-> batabase

jantsu78

Verified User
Joined
Apr 12, 2009
Messages
8
Hello,

I changed my localtime in etc/localtime
Now clock is ok but apache error log shows -->

"Server time for webserver xxxx.com not in synch with database: database=xxxxxxxxxxxx (2009-05-05 06:42:38), webserver=xxxxxxxxxxxx(diff=480 minutes)"

Yes, the difference is 480 min for old localtime file. How can i fix this?
 
run the ntpdate command:

ntpdate pool.ntp.org

You should set it on a crontab to run like every 5 mins or something.
 
OK thanks for that.

First i need install ntpdate, any note somewhere how to do it? Search did not give me anything.
 
Using rdate or ntpdate is suggested only for systems not always connected to Internet or where time is not important.
On a server "ntpd" is the only reliable way to keep the machine synchronized.

Run "yum install ntpd" (it may also be called just "ntp") or "aptitude install ntp" to install it, edit /etc/ntp.conf and choose four (not three, not five!) addresses from the NTP Public Pool, try to pick them from your own country.
Usually they are called 0-3.XX.pool.ntp.org where XX is your country code. So if your server is in The Netherlands, this will be your config:
Code:
	   server 0.nl.pool.ntp.org
	   server 1.nl.pool.ntp.org
	   server 2.nl.pool.ntp.org
	   server 3.nl.pool.ntp.org

When you finished editing just restart the ntpd service.
 
Back
Top