Loading

Thursday, July 23, 2009

Linux NTP Configuration

SETTING DATE MANUALLY WITH NTP
====================================
ntpdate -u 130.207.244.240
clock --systohc
date
clock


CONFIGURING /etc/NTP.CONF
====================================
server 130.207.244.240


FORCING NTP updates (syncs w/ NTP server at X:27 every hour)
====================================
mkdir /root/bin

vi /root/bin/forceNTP.sh
/usr/sbin/ntpdate -u 130.207.244.240
/sbin/clock --systohc

chmod 744 /root/bin/forceNTP.sh

crontab -e
27 * * * * /root/bin/forceNTP.sh >/dev/null 2>&1


~~~~~~~~ALTERNATE PROCESS


RUN THESE COMMANDS
=======================================================================
mkdir /root/bin
echo "/usr/sbin/ntpdate -u 130.207.244.240" > /root/bin/forceNTP.sh
echo "/sbin/clock --systohc" >> /root/bin/forceNTP.sh
chmod 755 /root/bin/forceNTP.sh

THEN TAKE THESE STEPS (replace ## with the time of each hour you want the script to run)
=======================================================================
crontab -e
## * * * * /root/bin/forceNTP.sh >/dev/null 2>&1

No comments:

Post a Comment