From Dgiref
WARNING: Time synchronization
A common source of errors in the establishment of the grid environments is the incorrect or inadequate time synchronization of the participating systems. The common time on the clocks, however, is a necessary prerequisite for the smooth communication between the middleware components, particularly for the Grid Security Infrastructure (GSI).
It is recommended that all systems start the NTP daemon (ntpd) or at least call regularly ntpdate cronjob. The ntpd or ntpdate should be configure to synchronize the machine's system clock with any known organization with the appropriate time-server or via the competent computer center (or institution).
|
download administrator's script: ntp.sh |
#!/bin/sh
# NTP configuration
yum install ntp
# Configure and start NTP daemon on server machines:
cat << EOF >> /etc/ntp.conf
#restrict <time_server_IP_address> mask 255.255.255.255 nomodify notrap noquery
#server <time_server_name>
server timehost.domain burst iburst
EOF
## Edit the file /etc/ntp/step-tickers
# adding a list of your time server(s) host name(s)
# ELECTIVE!
# cat << EOF >> /etc/ntp/step-tickers
# <time_server_IP_address>
# EOF
## allow inbound communication on the NTP port
cat << EOF >> /etc/sysconfig/iptables
-A INPUT -s NTP-serverIP-1 -p udp --dport 123 -j ACCEPT
-A INPUT -s NTP-serverIP-2 -p udp --dport 123 -j ACCEPT
EOF
/etc/init.d/iptables restart
## Activate the ntpd service with the following commands:
ntpdate <your ntp server name>
service ntpd start
chkconfig ntpd on
## check ntpd's status by running
ntpq -p