Below is how to enabling Network Time Protocol Daemon (ntpd) on your linux box (RedHat, CentOS, Fedora)
Make sure you already install ntp package, if not type
Connecting your linux box to NTP Server. because I am in Indonesia, I am using ntp.kim.lipi.go.id
If you want to provide other PCs in your network synchronize their time on to NTP Server add this line, so other PCs dont need consume bandwidth.
Enabling ntpd run everytime your linux start
Start, stopping ntpd
Verifying ntpd running
Doing An Initial Synchronization. Must be done when ntpd stop
Determining If NTP Is Synchronized Properly
Make sure you already install ntp package, if not type
CODE:
# yum install ntp
# yum install ntp
Connecting your linux box to NTP Server. because I am in Indonesia, I am using ntp.kim.lipi.go.id
CODE:
# vi /etc/ntp.conf
server ntp.kim.lipi.go.id
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
# vi /etc/ntp.conf
server ntp.kim.lipi.go.id
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
If you want to provide other PCs in your network synchronize their time on to NTP Server add this line, so other PCs dont need consume bandwidth.
CODE:
# vi /etc/ntp.conf
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# vi /etc/ntp.conf
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
Enabling ntpd run everytime your linux start
CODE:
# chkconfig ntpd on
# chkconfig ntpd on
Start, stopping ntpd
CODE:
# service ntpd start
# service ntpd stop
# service ntpd restart
# service ntpd start
# service ntpd stop
# service ntpd restart
Verifying ntpd running
CODE:
# pgrep ntpd
# pgrep ntpd
Doing An Initial Synchronization. Must be done when ntpd stop
CODE:
# ntpdate -u ntp.kim.lipi.go.id
# ntpdate -u ntp.kim.lipi.go.id
Determining If NTP Is Synchronized Properly
CODE:
# ntpq -p
# ntpq -p