<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,如需轉載請自行聯系原作者