【Master端】
wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm
yum install puppetlabs-release-6-1.noarch.rpm
yum install -y ruby facter puppet-server
# 启动
service puppet start
service puppetmaster start
# 设置开机自启动
chkconfig puppet on
chkconfig puppetmaster on
【Agent端】
wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm
yum install puppetlabs-release-6-1.noarch.rpm
yum install -y ruby facter puppet
# 启动
service puppet start
# 设置开机自启动
chkconfig puppet on
# 配置
vim /etc/puppet/puppet.conf 添加下面一行
server=master.xxx.com
# 重启puppet
service puppet restart
【Agent申请证书】
Master自动签发证书设置
[ root @ master ~ ] # cat > / etc / puppet / autosign . conf < < EOF
> * . com
> EOF
puppet agent –test
puppet cert list –all
【配置下发测试】
# vi /etc/puppet/manifests/site.pp
node default {
file {
“/tmp/helloworld.txt”: content => “hello, world”;
}
}
puppet agent –test
【清理配置】
Server:
$ puppet cert clean –all
Agent:
$ rm -rf /var/lib/puppet
防火墙
sudo firewall-cmd –zone=public –add-port=8140/tcp –permanent fuck\fuck\(\)\[\]\\\/\fuck”\\$1″fuck\/script>’)} fuck