How to synchronize time on 2 server CentOS (do not use NTP)
Hi everybody.
I'm using CentOS 5.5 on VMware. Assume that I have two servers CentOS: one primary server (IP 192.168.10.10) and one backup server (IP 192.168.10.20). Now I want to synchronize time on 2 servers and I was told not to use NTP. I search on Internet and found 2 way as follow: +) using rdate: on backup server, I use : [root@localhost ~]# rdate -s 192.168.10.10 and the following error: [root@localhost ~]# rdate: couldn't connect to host localhost: Connection refused. +) using net time and also failure: [root@localhost ~]# net time set 192.168.10.10 /set /y Could not locate a time server. Try specifying a target host. I don't understand why errors occur. Is there other way to synchronize time on 2 servers? Can you help me, please! Thanks! |
Hi,
You have 2 (two) options: - htpdate , man htpdate, rpm and my favorite - ntpdate but, I doubt you will have success in VMWare machines, because they are synced to HOST machine running VMWare (and which should have been NTP synced). VMWare guests cannot have different time/date than host machine (by my experience) good luck |
Another messy way is to set up keypairs and then run a script on primary that creates a keypair authenticated ssh session on backup and then uses date -s to set the time.
|
Thank everybody. I used htpdate and I synchronized on 2 servers.
|
Great,
can you please mark the thread as solved if you find the solution appropriate (how- look my sign.) Regards. |
Ok. I has marked the thread as solved. Thanks lithos very much.
|
All times are GMT -5. The time now is 04:45 PM. |