WHAT'S NEW?
Loading...

Konfigurasi NTP Server Di Debian 7


Assalamu'alaikum???
Selamat sore kawan... :D    Pada sore ini saya akan memberikan  cara Konfigurasi NTP Di Debian Server.  Sebelum memulai konfigurasi mari kita simak dulu pengertian dan fungsi NTP.

Network Time Protocol (NTP) adalah sebuah protokol yang berfungsi untuk menyamakan waktu dari setiap komputer yang terhubung dengan jaringan dengan komputer server dalam jaringan tersebut, bisa pada jaringan LAN (Local Area Network) maupun pada jaringan Internet, NTP itu sendiri menggunakan jalur data TCP/IP.

OK...  Langsung saja kita mulai konfigurasinya.
1. Pertama kita instal paket nya terlebih dahulu. Berikut perintahnya:
root@Debian:~# apt-get install ntp ntpdate
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libopts25 lockfile-progs
Suggested packages:
  ntp-doc
The following NEW packages will be installed:
  libopts25 lockfile-progs ntp ntpdate
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/705 kB of archives.
After this operation, 1684 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "id_ID.UTF-8",
LC_MONETARY = "id_ID.UTF-8",
LC_ADDRESS = "id_ID.UTF-8",
LC_TELEPHONE = "id_ID.UTF-8",
LC_NAME = "id_ID.UTF-8",
LC_MEASUREMENT = "id_ID.UTF-8",
LC_IDENTIFICATION = "id_ID.UTF-8",
LC_NUMERIC = "id_ID.UTF-8",
LC_PAPER = "id_ID.UTF-8",
LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libopts25.
(Reading database ... 24936 files and directories currently installed.)
Unpacking libopts25 (from .../libopts25_5.12-0.1_i386.deb) ...
Selecting previously unselected package ntp.
Unpacking ntp (from .../ntp_4.2.6.p5+dfsg-2_i386.deb) ...
Selecting previously unselected package ntpdate.
Unpacking ntpdate (from .../ntpdate_4.2.6.p5+dfsg-2_i386.deb) ...
Selecting previously unselected package lockfile-progs.
Unpacking lockfile-progs (from .../lockfile-progs_0.1.17_i386.deb) ...
Processing triggers for man-db ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up libopts25 (1:5.12-0.1) ...
Setting up ntp (1:4.2.6.p5+dfsg-2) ...
[ ok ] Starting NTP server: ntpd.
Setting up ntpdate (1:4.2.6.p5+dfsg-2) ...
Setting up lockfile-progs (0.1.17) ...
root@Debian:~# 

2. Setelah selesai menginstall paketnya, Sekarang kita edit file ntp.conf. Berikut perintahnya :
root@Debian:~# nano /etc/ntp.conf
 /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#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 127.127.1.0
fudge 127.127.1.9 stratum 1

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
Note: Berikan tanda "#" pada tulisnya yang berwarna merah lalu tambahkan script yang berwarna hijau.

3. Setelah selesai mengedit dan menyimpannya, Sekarangnya kita restart NTP nya dengan perintah berikut:


root@Debian:~# /etc/init.d/ntp restart
[ ok ] Stopping NTP server: ntpd.
ok ] Starting NTP server: ntpd.
root@Debian:~# 
4. Apabila sudah direstart sekarang saatnya pengujian di Client nya.
*** Keterangan ***

  • Buka pengaturan waktu dan tanggal
  • Internet Time
  • Change Setting
  • Lalu masukkan ip server 
  • Klik Update Now
  • Ok

Ok..   Sekian dari saya dan Terimakasih  :D    *** See You Next Time ***


0 komentar:

Posting Komentar