it can be an internal server that has the NTP service open for clients, or an public NTP server. To be sure, use 2 servers. To check if you can access it, run ntpdate timeserver.ntp.ch
Edit the /etc/ntp.conf file
Rename the current file to ntp.bak.conf and make a small new one: restrict default ignore<br />
server timeserver.ntp.ch # Swiss time<br />
server ntp.ucsd.edu # Univ of California, San Diego<br />
restrict timeserver.ntp.ch mask 255.255.255.255 nomodify notrap noquery<br />
restrict ntp.ucsd.edu mask 255.255.255.255 nomodify notrap noquery<br />
server 127.127.1.0 # local clock<br />
fudge 127.127.1.0 stratum 10 #so it only takes over if the rest fails<br />
restrict 127.0.0.1 driftfile /etc/ntp/drift broadcastdelay 0.008 authenticate no
Set your system clock right
Run the following command a couple of times: ntpdate -u timeserver.ntp.ch # or whatever server you want to use
You will see the initial diffence in time go away afer the 2nd or 3rd time.
Set hardware clock
/sbin/hwclock --systohc
Run the ntpd daemon
service ntpd start
Add ntpd to the services started at boot time
chkconfig ntpd on
Check the NTP results
ntpd -p
will show you what the difference is between your clock and that of the servers you added. You are looking for lines like <br />
remote refid st t when poll reach delay offset jitter<br />
==========================================================================<br />
LOCAL LOCAL 10 l 30 64 377 0.000 0.000 0.004 *<br />
192.168.246.107 192.168.246.88 3 u 41 128 177 0.313 5.598 0.345
and not lines like <br />
remote refid st t when poll reach delay offset jitter<br />
==========================================================================<br />
192.168.246.126 LOCAL 11 u 37 128 375 0.204 6082.02 6069.84
Jitter is too high!
Redirecting with Apache’s .htaccess
• 04 Jul 2007
• When you migrate web sites from one place to another, and the URLS change, you don’t want to lose visitors that still use the old links. If your ‘old’ website ran on Apache, you can use its mod_alias/mod_rewrite functionality to automatically redirect to the new URL. This involves adding redirect...
Convert Bind DNS zone into PTR records
• 15 Jun 2005
• The following script I made in order to convert the forward DNS records in a /var/named/db.[domain] file into the correct format for a reverse DNS db.[subnet prefix] file. `` #!/bin/sh (…) DNSROOT=/var/named PREFIX=$1 DOMAIN=$2 shift 2 DNSPRE=$DNSROOT/db.$PREFIX DNSDOM=$DNSROOT/db.$DOMAIN echo “; save this in $DNSPRE” ( if [ -f $DNSDOM ]...
Perl HTML scraping part #1
• 21 Jan 2005
• Here we are, back at the scene of the crime. Yes, I know it’s been a while. And the task of the day is: