# Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict -6 ::1
# Hosts on local network are less restricted. #restrict 192.168.1.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
# Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict -6 ::1
# Hosts on local network are less restricted. #restrict 192.168.1.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 restrict 192.168.146.2 mask 255.255.255.0 nomodify notrap # 修改对应的ip地址 server 127.127.1.0 fudge 127.127.1.0 stratum 10
[root@master ~]# service iptables stop & chkconfig iptables off [1] 1268 [root@master ~]# iptables: Setting chains to policy ACCEPT:[ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ]
[1]+ Done service iptables stop #如果关闭卡住,按一下回车键 [root@master ~]# service iptables status iptables: Firewall is not running. [1]+ Done service iptables stop [root@master ~]#
(4) 在 master 配置 IP 映射,在 vi /etc/hosts 添加 192.168.128.130 master # 自己的 ip 192.168.128.131 slave1 192.168.128.132 slave2