<a href="http://linux.cn/article-3959-1.html" target="_blank">http://linux.cn/article-3959-1.html</a>
<a href="http://www.tuicool.com/articles/YRvyQnf" target="_blank">http://www.tuicool.com/articles/YRvyQnf</a>
一、服务器安装和配置
1、修改hostname。
# hostnamectl set-hostname master.server.com
2、修改/etc/hosts
# vi /etc/hosts
添加服务器和客户端的dns解析
192.168.127.140 master.server.com
192.168.127.146 client1.server.com
保存并退出。
3、 安装ruby
# yum -y install ruby ruby-libs
4、安装puppet-server
# yum install -y puppet-server
5、修改配置文件
# vi /etc/puppet/puppet.conf
在[master]节点最后添加:
certname=master.server.com
如果没有[master]节点,手动添加上去。
保存退出
6、设置开机启动
# systemctl enable puppetmaster
7、启动服务
# systemctl start puppetmaster
服务器配置完毕!
二、客户端安装和配置
# hostnamectl set-hostname client1.server.com
4、安装puppet
# yum install -y puppet
在[agent]节点最后添加:
server=master.server.com
# systemctl enable puppet
# systemctl start puppet
客户端配置完毕!
三、添加认证。
1、 客户端执行
# puppet agent -t
2、服务端执行
# puppet cert list
出现请求过的认证信息后执行:
# puppet cert sign client1.server.com
到处为止puppet服务端和客户端都能正常工作了
本文转自 yntmdr 51CTO博客,原文链接:http://blog.51cto.com/yntmdr/1592472,如需转载请自行联系原作者