昨天搞了一天,在master端设置了 iptables -A INPUT -p -tcp --dport 8140 -j ACCEPT 之后,在agent端运行puppet agnet -t还总是报错,网上说是master端防火墙没关闭,这下就郁闷了。上面的那条命令明明就是关闭防火墙的,而且在ubuntu上是好使的,换成centos就不行了,后面无意找到这篇文章http://www.cactifans.org/linux/994.html算是通信没问题了。
核心命令:
1) 安装ntp wget
yum install wget ntp -y
2) 关闭selinux
sed -i '/SELINUX/ s/enforcing/disabled/g' /etc/selinux/config
setenforce 0
3) 停止iptables
chkconfig ip6tables off
chkconfig iptables off
/etc/init.d/ip6tables stop
/etc/init.d/iptables stop
(我试了下 前三步就可以了 puppet agent -t 认证就没有问题了)
------------------------------------------------------------------------------
4) 设置ntp
ntpdate pool.ntp.org
chkconfig ntp on
service ntpd start