In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install NTP in Centos" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install NTP in Centos" article can help you solve the problem.
NTP (Network Time Protocol) network time protocol is based on UDP, which is used for network time synchronization. The computer clock in the network can be synchronized to UTC, and the accurate synchronization can be realized with the offset adjustment of each time zone. There are many servers that provide NTP synchronization, such as Microsoft's NTP synchronization server. Using the timing function provided by the NTP server, our device clock system can run correctly.
Check whether ntp# rpm-qa is installed | grep ntpntp-4.2.4p8-2.el6.centos.i686 configuration ntp.conf# vim / etc/ntp.conf
The following items need to be modified:
Restrict: sets the permissions of the client to connect to this NTP server
Its rule is: restrict ip mask netmask_ip parameter
Where IP can be an address bit or default;parameter has the following options:
Ignore: turn off all NTP link services
Nomodify: indicates that client cannot change the parameter information on the server side
Notrust: unless the client is authenticated, the source of the client will be considered untrusted domain
Noquery: no client time query is provided
Server:
Indicates to set the address where this NTP server connects to a remote NTP server
Server 127.127.1.0
Fudge 127.127.1.0 stratum 10
The above two lines indicate that if the connection to the server specified by server fails, the local time is used to synchronize the time.
Configuration Log:
Statsdir / var/log/ntp/
Logfile / var/log/ntp/ntp.log
A simple configuration is made in this paper, and the contents are as follows:
Driftfile / var/lib/ntp/driftrestrict 127.0.0.1restrict 192.168.0.0 mask 255.255.255.0 nomodify notrapserver 210.72.145.44 preferserver 133.100.11.8server 0.asia.pool.ntp.orgserver 2.asia.pool.ntp.orgserver 1.asia.pool.ntp.orgserver 127.127.1.0 # local clockfudge 127.127.1.0 stratum 8includefile / etc/ntp/crypto/pwkeys / etc/ntp/keysstatsdir / var/log/ntp/logfile / var/log / ntp/ntp.log starts the ntp# mkdir-p / var/log/ntp & & touch / var/log/ntp/ntp.log# chkconfig ntpd on# service ntpd start client test
Test ntp server through the linux client
# ntpdate 192.168.0.45 Aug 15:43:22 ntpdate [30958]: adjust time server 192.168.0.4 offset 0.000576 sec
When the above message appears, it indicates that you have successfully configured ntp server!
Note: if ntp has just started, an error message of no server suitable for synchronization found will appear during client synchronization. This is because ntp server has just started and has not been synchronized with the superior ntp. If you synchronize it on the client in about 5 minutes, you can get the correct information.
This is the end of the introduction on "how to install NTP in Centos". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.