Linux server time synchronization in LAN 1. use an Internet-accessible server as a time server: #/usr/bin/rdate-s time-b.timefreq.bldrdoc.gov // synchronize the time server with the Internet time server #/etc/init. d/ntpd start // start time server # vi/etc/cron. weekly/rdateweekly. sh // set the scheduled task to be synchronized once a week ----------------------------------------#! /Bin/sh www.2cto.com/usr/bin/rdate-s time-b.timefreq.bldrdoc.gov ---------------------------------------- # chmod a + x/etc/cron. weekly/rdateweekly. sh # setup // set ntpd to auto start # vi/etc/sysconfig/iptables // modify firewall to allow time server communication ---------------------------------------------A RH-Firewall-1-INPUT-m state -- state NEW-m udp-p udp -- dport 123-j ACCEPT-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tc P -- dport 123-j ACCEPT -------------------------------------------- www.2cto.com 2. set other servers in the LAN to synchronize with the time server # ntpdate 192.168.1.1 // the IP address is the IP address of the above time server # vi/etc/cron. weekly/ntpdateweekly. sh // set the scheduled task to be synchronized once a week ----------------------------------------#! /Bin/sh/usr/sbin/ntpdate 192.168.1.1 ---------------------------------------- # chmod a + x/etc/cron. weekly/ntpdateweekly. sh 3. Get it done! Iloveyin