Installing NTP Server
NTP packages are available under default repositories. You just login to your server as root user and execute following command.
# yum install ntp
Configure NTP Server
Sync Local Time from pool.ntp.org
First we need to keep synchronize time of this server. For this we
will use NTP POOL cluster servers to synchronize time of local system.
NTP POOL project is providing large number of cluster servers. Lets edit
NTP configuration file and update following values
# vim /etc/ntp.conf
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
As NTP pool providing large number of server spread world-wide. We
suggest to use any near by servers also. You can find nearby servers at
http://www.pool.ntp.org/en/.
Allow LAN Systems
Now configure your ntp server to allow LAN systems to keep
synchronize their time from this server. To do it add following entry in
configuratio nfile
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
|
Add caption |
Restart NTP Server
NTP server listen on UDP port 123. After making all above configuration, Let’s restart NTP server using following commands.
For CentOS/RHEL 7 and Fedora 21
# systemctl start ntpd
# systemctl enable ntpd
For CentOS/RHEL 6/5 and Fedora 20/19
# service ntpd start
# chkconfig ntpd on
No comments:
Post a Comment