find a lot of information, do not have windows to do time services, Linux synchronization Windows time, and finally found some software, finally took care of, write to share, so as to avoid many detours
First in http://www.meinberg.de/english/sw/index.htm
downloaded an NTP service program for Windows: Ntp4171.zip
Windows 192.168.1.32
1. Installation is prompt to set the server address, I set the IP of the native widows machine
control of the 2.NTPD in:
Control Panel->; management Tools->; Component Services-networktimeprotocol
3. Can start the ntpd daemon to keep time synchronized
4. There is an NTP configuration file under the C:\WINNT directory ntp.conf
set to:
Server 127.127.1.0 prefer
Fudge 127.127.1.0 Stratum
5. Determine if NTP is working: Ntpq-p
Linux and Windows Sync, I'm using Redhat 9.0
Execute command: ntpdate 192.168.1.32
you'll find that your time is changing, just like the 192.168.1.32 time .
If there is an error executing the command
1. Hint: 7 Dec 19:24:55 ntpdate[2120]: The NTP socket is in use, exiting
This is the process that already exists on your Linux machine, input: Ps-ef | grep ntpd
Kill the NTP process
2. Hint: No Server suitable for synchronization found
This is the most likely problem, it is more common to configure the server and start the server process, immediately
start the client process and the client process will get an error. The workaround is to start the process in about 3-5 minutes.
I want to sync time with Windows service every 10 minutes
1. Create your own crontab file, build a file Date.cron, you can use any text first
The editor creates a new file and writes to it the command to run and the time to execute it periodically.
VI date.cron Add the following command to run and the time to execute periodically
*/10 * * * * /usr/sbin/ntpdate 192.168.1.32
then save the disk.
2. Use the crontab command to install the file so that it becomes the user's crontab file. Type:
crontab Date.cron
This file is already set up.
3. Use the command:
crontab-l (View scheduled job sequences) you can see just the job
such as:
[email protected] root]# crontab-l
# do not EDIT this file-edit the master and reinstall.
# (Date.cron installed on Tue Dec 7 18:22:42 2004)
# (Cron version--$Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
*/10 * * * * /usr/sbin/ntpdate 192.168.1.32
now it's OK, every 10 minutes Linux is synchronized with the server.