Bước 1:
#yum install ntp -y
Bước 2:
#vi /etc/ntp.conf
# Hosts on local network are less restricted.(range ip cho phép đồng bộ time)
restrict 192.168.221.0 mask 255.255.255.0 nomodify notrap
Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#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
server time.google.com iburst <==server đồng bộ time
Bước 3:
#service ntpd start
#chkconfig ntpd on
Bước 4: mở iptables:
-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT
==> kiểm tra xem ntp có làm việc hay ko ?
root@services ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*time4.google.co .GOOG. 1 u 2 64 1 51.753 7.145 5.972
Pages
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment