您的位置:首页 > 其它

Puppet Server和client的安装

2011-11-14 16:16 239 查看
1puppet介绍:puppet基于ruby语言开发支持已C/S模式或独立模式运行支持所有的UNIX和LINUX系统配置适用业务系统的整个生命周期支持节点方式管理若干服务器群组支持对windows操作系统管理(功能有限)2puppet工作架构

3更新server和client的配置文件

192.168.10.180master.notry.com#个人虚拟机环境
192.168.10.122client1.notry.com
192.168.10.157clinet2.notry.com

4puppetserver的安装:

安装EPEL
sudorpm–Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
安装puppet服务端
sudoyum–yinstallpuppet-server
启动puppet服务
sudo/etc/init.d/puppetmasterstart

5Puppetclient的安装

安装EPEL
sudorpm–Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
安装puppet客户端

sudoyum-yinstallpuppet
提交证书申请
sudopuppet--servermaster.notry.com--test
6Puppet证书管理

服务器端可用的puppetca管理证书

puppetca–list#查看到申请证书的客户端主机名puppetca–s#主机名,为特定的主机颁发证书puppetca–sand–a#为所有的主机颁发证书puppetca–land–a#列出所有主机,+号代表已经领证的机器

7认证client1

[notry@masteropt]$puppetca--listclient1.notry.com[notry@masteropt]$puppetca--list-a
PuppetServer端目录结构
[notry@masterpuppet]$pwd/etc/puppetauth.confclient访问puppetserver的ACL配置文件fileserver.confpuppetserver作为文件服务器的ACL配置文件manifestsPuppet脚本主文件目录,至少需要包含site.pp入口脚本文件modulesPuppet模块目录,存放Puppet脚本的功能模块namespaceauth.conf命名空间ACL配置文件
puppet.confPuppet服务器端配置文件

8简单的测试

server端操作:
vim/etc/puppet/manifests/site.ppclasstext{file{"/opt/a.txt":ensure=>"present",content=>"HelloPuppet!\n",owner=>"root",group=>"root",mode=>644}}nodeclient1{includetext
}
client1端操作:
puppetd--servermaster.notry.com--test

观察是否在client1的/opt/下生成内容为HelloPuppet!的a.txt文件。

本文出自“不想走路”博客,请务必保留此出处http://notry.blog.51cto.com/3909869/714002
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: