Anda di halaman 1dari 2

NTP SERVER DEBIAN

From my blog dheelinux.wordpress.com


NTP server atau yang lebih dikenal dengan Network Time Protocol adalah aplikasi layanan dari
server untuk melakukan sinkronisasi waktu dengan client-clientnya. sehingga time yang ada di sebuah
jaringan adalah sama dan seragam.
NTP Server yang akan saya paparkan disini adalah NTP server yang bersifat lokal. artinya
sinkronisasi NTP dilakukan secara lokal dan tanpa koneksi internet.
oke, langsung aja yah
1. instal paket dari NTP yang diperlukan:
#apt-get install ntpdate ntp-server
2. lakukan editing file ntp.conf
#nano /etc/ntp.conf
3. edit file ntp.conf seperti dibawah ini:
#ntp.conf
# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
# pool.ntp.org maps to more than 300 low-stratum NTP servers.
# Your server will pick a different set every time it starts up.
# *** Please consider joining the pool! ***
# *** ***
#server 0.debian.pool.ntp.org iburst
#server 1.debian.pool.ntp.org iburst
#server 2.debian.pool.ntp.org iburst
#server 3.debian.pool.ntp.org iburst
#server 192.168.7.1 # local clock
#fudge 192.168.7.1
server 127.127.1.0 #local clock
fudge 127.127.1.0 stratum 10
# By default, exchange time with everybody, but dont allow configuration.
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
#restrict -4 default kod notrap nomodify nopeer noquery
#restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
#restrict ::1
# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict 192.168.123.0 mask 255.255.255.0 notrust
restrict 192.168.7.0 mask 255.255.255.248 nomodify notrap
# If you want to provide time to your local subnet, change the next line.

# (Again, the address is an example only.)


#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth
#broadcastclient
keterangan yang bertuliskan bold:
bold pertama:
memasukkan alamat lokal yang akan kita pkai acuan time server
bold kedua:
dipagarkan
bold ketiga:
alamat network yang akan kita pakai pada network kita. apabila hanya menggunakan 1 network, buat
seperti diatas. namun apabila menggunakan 2 atau lebih, masukkan alamat network pada baris
dibawahnya.
4. simpan dan keluar dengan mengetikkan ctrl+x dan y, lalu tekan enter.
5. cek service dari NTP:
#ntpq- p
jika sudah ada output dari service tersebut (output local), berarti service NTP telah berjalan.
6. sinkronisasikan dengan ntp server lokal
#ntpdate -u 127.0.0.1 (IP localhost)
*terkadang kita memang memerlukan waktu agar clock server local menjadi stabil, jadi mungin saat
sinkronisasi pertama, akan keluar output no server suitable bla.. bla... jika memang demikian, tunggu
10-15 menit dan ulangi lagi langkah nomer 6.

Anda mungkin juga menyukai