本文系统Client6.0
本文旨在安装puppet,并且测试OK;相关file,service,exec,user管理后面会推出;
master端:
1
2
3
4
5
6
7
|
[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端:
1
2
3
4
5
6
7
|
[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 端:
1
2
3
4
|
[root@master ~]# yum install puppetmaster -y
[root@master ~]# vim /etc/puppet/puppet.conf
autosign =
true
#新增自动签证client端的注册信息
service puppetmaster start
|
client端:
1
2
|
[root@client ~]# yum install puppet -y
service puppet start
|
测试
1
|
[root@client puppet]# puppetd --test --server master.lansgg.com --verbose
|
PS:注意时间同步
到此说明通信OK了;
下面来个文件测试:
master端:
1
2
3
|
[root@master ~]# vim /etc/puppet/manifests/site.pp
file {
"/tmp/lansgg.txt"
:
content =>
"lansgg test,pass~\n"
;}
|
client端:
1
|
[root@client puppet]# puppetd --test --server master.lansgg.com --verbose
|
测试通过,文件已经下发;
关于在master端查看证书:
puppetca -s -a (签证所有client证书)
puppetca -s 某个client证书
puppetca -a -l 查看已经签证的证书
安装完毕,测试完毕
本文转自 西索oO 51CTO博客,原文链接:http://blog.51cto.com/lansgg/1299604