Introduction
NTP is widely used to synchronize a computer to
Internet time servers or other sources, such as a radio or satellite
receiver or telephone modem service. It can also be used as a server for
dependent clients. It provides accuracies typically less than a
millisecond on LANs and up to a few milliseconds on WANs. Typical NTP
configurations utilize multiple redundant servers and diverse network
paths in order to achieve high accuracy and reliability.
Text retired from Web page's Network Time Protocol
Configure NTP Server
- yum install ntp (and type 'y' when show up two questions);
- vi /etc/ntp.conf
- Add the next statement for accept requests from another servers (DNS server, LDAP server, etc.) on your LAN:
restrict 10.50.0.0 mask 255.255.255.0 nomodify nopeer noquery - Add the next statement for public servers NTP synchronize with server's internal clock on your LAN:
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org - This command allow to set current time from indicated NTP server:
ntpdate pool.ntp.org - The same server can be defined on configuration file:
vi /etc/ntp/step-tickers
pool.ntp.org - service ntpd start
- Make sure the ntpd is active from beginning Linux boot;
chkconfig ntpd on - Checking synchronization status of service NTP.
nptq -pn
tail -f /var/log/messages
Configure NTP Client
- This file allows to set server NTP to use for initial adjust clock during starting of ntpd:
vi /etc/ntp/step-tickers
10.50.0.254 - On the file /etc/ntp.conf, all you need is add server NTP's IP address to use:
vi /etc/ntp.conf
server 10.50.0.254 - Checking synchronization status of service NTP.
nptq -pn
tail -f /var/log/messages
It can take long to see message of success. When I was configuring, it took about 1 hour.
Conclusion
This protocol allows to keep operating system's clock synchronized with high accurate, running at information of synchronism got from another NTP servers.Although the configuration is relatively simple, NTP performances a very important role. The possibility to make sure that clocks from many servers are kept with right time is relevant and it is a important factor to correct of many applications. The correction of local time in operating system allows also ensure that logs recorded in operating system have correct time and that is important when I use logs to diagnostic problems of some services.
0 comments:
Post a Comment