本文系统Client6.0
本文旨在安装puppet,并且测试OK;相关file,service,exec,user管理后面会推出;
master端:
[root@master ~]# hostname
master.lansgg.com
[root@master ~]# cat /etc/hosts
192.168.182.155 master.lansgg.com master
192.168.182.142 client.lansgg.com client
[root@master ~]# ifconfig eth0 |grep "inet addr"
inet addr:192.168.182.155 Bcast:192.168.182.255 Mask:255.255.255.0
client端:
[root@client ~]# hostname
client.lansgg.com
[root@client ~]# cat /etc/hosts
192.168.182.155 master.lansgg.com master
192.168.182.142 client.lansgg.com client
[root@client ~]# ifconfig eth0 |grep "inet addr"
inet addr:192.168.182.142 Bcast:192.168.182.255 Mask:255.255.255.0
开始安装puppet(注意安装selinux和iptables)
master 端:
[root@master ~]# yum install puppetmaster -y
[root@master ~]# vim /etc/puppet/puppet.conf
autosign = true #新增自动签证client端的注册信息
service puppetmaster start
client端:
[root@client ~]# yum install puppet -y
service puppet start
测试
[root@client puppet]# puppetd --test --server master.lansgg.com --verbose

PS:注意时间同步
到此说明通信OK了;
下面来个文件测试:
master端:
[root@master ~]# vim /etc/puppet/manifests/site.pp
file {"/tmp/lansgg.txt":
content => "lansgg test,pass~\n";}
client端:
[root@client puppet]# puppetd --test --server master.lansgg.com --verbose

测试通过,文件已经下发;
关于在master端查看证书:
puppetca -s -a (签证所有client证书)
puppetca -s 某个client证书
puppetca -a -l 查看已经签证的证书
安装完毕,测试完毕
Puppet 的详细介绍:请点这里
Puppet 的下载地址:请点这里
Puppet 学习系列:
Puppet 学习一:安装及简单实例应用 http://www.linuxidc.com/Linux/2013-08/88710.htm
Puppet学习二:简单模块配置和应用 http://www.linuxidc.com/Linux/2013-08/88711.htm
相关阅读:
有关Puppet agent端三种备份恢复方案探讨研究 http://www.linuxidc.com/Linux/2013-07/87885.htm
选择更安全的方式注册你的Puppet节点 http://www.linuxidc.com/Linux/2013-07/87884.htm
通过配置SSH深刻理解Puppet的语法及工作机制 http://www.linuxidc.com/Linux/2013-07/87882.htm
Puppet利用Nginx多端口实现负载均衡 http://www.linuxidc.com/Linux/2013-02/79794.htm
CentOS(5和6)下Puppet的C/S模式实例 http://www.linuxidc.com/Linux/2011-12/50502.htm
