Chinaunix首页 | 论坛 | 博客
  • 博客访问: 456649
  • 博文数量: 145
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1139
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-14 16:47
个人简介

路漫漫其修远兮,吾将上下而求索

文章分类

全部博文(145)

文章存档

2016年(10)

2015年(15)

2014年(120)

我的朋友

分类: 系统运维

2014-01-15 11:52:22


点击(此处)折叠或打开

  1. server system-test 10.152.14.85
  2. client xuesong 10.152.14.106
  3. 系统centos5.8
两台配置都配置

点击(此处)折叠或打开

  1. /etc/hosts
  2. 10.152.14.85 system-test
  3. 10.152.14.106 xuesong
  4. wget
  5. rpm -Uvh epel-release-5-4.noarch.rpm
服务端安装

点击(此处)折叠或打开

  1. yum install -y puppet-server
  2. sed -i '/ssldir/ a autosign=true' /etc/puppet/puppet.conf
  3. sed -i '/autosign/ a autosign=\/etc\/puppet\/autosign\.conf' /etc/puppet/puppet.conf
  4. echo "*" > /etc/puppet/autosign.conf
  5. service puppetmasterd start
  6. setenforce 0
客户端安装

点击(此处)折叠或打开

  1. yum install -y puppet
  2. cat >>/etc/sysconfig/puppet<
  3. PUPPET_SERVER=$ser
  4. PUPPET_PORT=8140
  5. PUPPET_LOG=/var/log/puppet/puppet.log
  6. EOF
  7. echo "runinterval=300" >> /etc/puppet/puppet.conf
  8. service puppet start

 客户端生成一个 SSL 证书并指定发给 Puppet 服务端

点击(此处)折叠或打开

  1. puppet agent --no-daemonize --onetime --verbose --debug --server=system-test

客户端测试与服务端

点击(此处)折叠或打开

  1. puppetd --test --server system-test

服务端查看通过签名的客户端

点击(此处)折叠或打开

  1. puppet cert list -all

使用
# 服务端添加任务

点击(此处)折叠或打开

  1. vi /etc/puppet/manifests/site.pp
  2. node default {
  3. file {
  4. "/tmp/helloworld.txt": content => "hello, world";
  5. }
  6. }

等待runinterval 指定的时间,查看客户端是否成功 cat /tmp/helloworld.txt


阅读(756) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~