Difference between revisions of "HIP:PMP:ntpdate"

From Earlham CS Department
Jump to navigation Jump to search
 
(Set time zone)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
# Download ntp from [[http://www.ntp.org/downloads.html http://www.ntp.org/downloads.html]]
+
== Download NTP ==
 +
[[http://www.ntp.org/ NTP: The Network Time Protocol]]
 +
(the version i got)
 +
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.2p4.tar.gz
  
  cd ntp-4.2.2p4
+
== Configure with -static, run make ==
 +
  cd ntp-4.2.2p4/
 
  ./configure CFLAGS="-static"
 
  ./configure CFLAGS="-static"
 
  make
 
  make
  
# cd to ntpdate/
+
== Copy ntpdate to PMP ==
# scp ntpdate to pmp
+
cd to ntpdate/
 +
scp ntpdate root@pmp2:/usr/local/bin
 +
 
 +
== Set time zone ==
 +
* I grabbed EST5EDT from codd.
 +
scp /usr/share/zoneinfo/EST5EDT root@pmp2:/usr/share/zoneinfo/
 +
* Link to localtime
 +
cd /etc
 +
ln -l /usr/share/zoneinfo/EST5EDT localtime
 +
 
 +
== Run at startup ==
 +
* I'm not sure of the proper way to do this. Works though.
 +
touch /etc/init.d/sync_time
 +
vi /etc/init.d/sync_time
 +
...
 +
#!/bin/sh
 +
/usr/local/bin/ntpdate cs.earlham.edu
 +
echo Syncing with cs.earlham.edu
 +
 
 +
* Add to rc3.d
 +
cd /etc/rc.d/rc3.d/
 +
ln -s ../../init.d/sync_time S73SYNCTIME

Latest revision as of 20:16, 30 October 2006

Download NTP

[NTP: The Network Time Protocol]

(the version i got)
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.2p4.tar.gz

Configure with -static, run make

cd ntp-4.2.2p4/
./configure CFLAGS="-static"
make

Copy ntpdate to PMP

cd to ntpdate/
scp ntpdate root@pmp2:/usr/local/bin

Set time zone

  • I grabbed EST5EDT from codd.
scp /usr/share/zoneinfo/EST5EDT root@pmp2:/usr/share/zoneinfo/
  • Link to localtime
cd /etc
ln -l /usr/share/zoneinfo/EST5EDT localtime

Run at startup

  • I'm not sure of the proper way to do this. Works though.
touch /etc/init.d/sync_time
vi /etc/init.d/sync_time
...
#!/bin/sh
/usr/local/bin/ntpdate cs.earlham.edu
echo Syncing with cs.earlham.edu
  • Add to rc3.d
cd /etc/rc.d/rc3.d/
ln -s ../../init.d/sync_time S73SYNCTIME