How-to: install puppet via yum

来源:互联网 发布:威纶通触摸屏数据保存 编辑:程序博客网 时间:2024/05/01 17:14
Master:
  • sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm
  • sudo yum install puppet-server
  • Add following in /etc/puppet/puppet.conf [main]: 
    dns_alt_names = master.chff.dc
  • sudo puppet master --verbose --no-daemonize

Agent:
  • sudo rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm
  • sudo yum install puppet
  • Add following in /etc/puppet/puppet.conf [main]:
    dns_alt_names = master.chff.dc
    server=master.chff.dc
  • sudo service puppet start
Verify:
  • At master node, create following file:
    [root@master ~]# cat /etc/puppet/manifests/site.pp
    node default {
    file {
    "/tmp/test":
    content=>"Hello FangFang \n",
    mode => 0644;
    }
    }
  • At agent node:
    puppet agent --test --ca_server=master.chff.dc
  • Verify at agent node:
    [root@slave puppet]# cat /tmp/test
    Hello FangFang
    [root@slave puppet]# ll /tmp/test
    -rw-r--r--. 1 root root 16 Jun 15 12:12 /tmp/test
0 0
原创粉丝点击