SETTING NTP SERVER ON LACAL LAN – UBUNTU SERVER


SETTING NTP SERVER ON LOCAL LAN –  UBUNTU SERVER

root@dbrscm:/etc# /etc/init.d/ntp stop

root@dbrscm:/etc# ntpdate server 0.us.pool.ntp.org

root@dbrscm:/etc# vim /etc/ntp.conf

server ntp.ubuntu.com
server nist1-dc.WiTime.net iburst
server ntp0.mcs.anl.gov
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org

Also, add a few extra lines to the bottom of your servers list to provide your current local time as a default should you temporarly lose Internet connectivity:

server 127.127.1.0
fudge 127.127.1.0 stratum 10

# Allow LAN machines to synchronize with this ntp server

restrict 0.0.0.0 mask 255.0.0.0 nomodify notrap

save and exit

root@dbrscm:/etc# /etc/init.d/ntp restart

root@dbrscm:/etc# ntpq -c lpeer
remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(0) .LOCL. 10 l 6 64 7 0.000 0.000 0.000 
root@dbrscm:/etc#

FROM NTP CLIENT

root@dbrscm:/usr/share/zoneinfo/Asia# /etc/init.d/ntp stop
* Stopping NTP server ntpd

root@dbrscm:/usr/share/zoneinfo/Asia# ntpdate 2.id.pool.ntp.org
18 Feb 11:48:59 ntpdate[24017]: adjust time server 103.12.12.14 offset -0.000175 sec

root@dbrscm:/usr/share/zoneinfo/Asia# ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

root@dbrscm:/usr/share/zoneinfo/Asia# hwclock –systohc

root@dbrscm:/usr/share/zoneinfo/Asia# date
Mon Feb 18 11:47:16 WIT 2013

root@dbrscm:/usr/share/zoneinfo/Asia# mysql -uroot -proot -e “select now()”

root@dbrscm:/usr/share/zoneinfo/Asia# vim /etc/mysql/my.cnf

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
timezone = GMT+7

root@dbrscm:/usr/share/zoneinfo/Asia# /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
mysql stop/waiting
mysql start/running, process 23853
root@dbrscm:/usr/share/zoneinfo/Asia#

root@dbrscm:/usr/share/zoneinfo/Asia# mysql -uroot -proot -e “select now()”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: