Install & start Puppet

本文介绍如何在服务器上安装Ruby 1.8.7、Facter 1.5.8及Puppet 2.6.4,并解决安装过程中遇到的权限问题。最后验证Puppet Master是否正确启动。

 

Install ruby-1.8.7

if the ruby is not installed on your machine, download the ruby-1.8.7 from the ruby web site.

For me, I download the ruby-1.8.7-p334.tar.gz from the ruby web site.

copy to user home /root and execute following commands:

#tar -zxvf ruby-1.8.7-p334.tar.gz
#cd ruby-1.8.7-p334
#./configure
#make
#make install


Install facter-1.5.8

Go to the puppet web site to get the facter-1.5.8.tar.gz package and execute following commands:

#tar -zxvf facter-1.5.8.tar.gz
#cd facter-1.5.8
#ruby install.rb


Install the puppet-2.6.4

Go to the puppet web site to get the puppet-2.6.4.tar.gz package and execute following commands:

#tar -zxvf puppet-2.6.4.tar.gz
#cd puppet-2.6.4
#ruby install.rb


Start the puppet master

After installing, then we can start the puppet master by execute following commands:

#puppet master --mkusers

the puppet user will be added

#puppet master -d -v --no-daemonize

When this command executed, we will see following error line:

err: /File[/var/lib/puppet/rrd]/ensure: change from absent to directory failed: Could not set 'directory on ensure: Permission denied - /var/lib/puppet/rrd

This means the /var/lib/puppet/rrd does not exit, execute following command to create it:

#mkdir -p /var/lib/puppet/rrd

Then we execute puppet master again

#puppet master -d -v --no-daemonize

Following error lines appear:

err: /File[/var/lib/puppet/rrd]/owner: change from root to puppet failed: Failed to set owner to '502': Operation not permitted - /var/lib/puppet/rrd
err: /File[/var/lib/puppet/rrd]/group: change from root to puppet failed: failed to chgrp /var/lib/puppet/rrd to 502: Operation not permitted - /var/lib/puppet/rrd


We need to change the ownership of /var/lib/puppet/rrd to puppet:puppet

#chown -R puppet:puppet /var/lib/puppet/rrd

Then execute the puppet master again

#puppet master -d -v --no-daemonize

At this time, no error line appears any more.

Test the puppet master

test if the puppet master works ok by running following comand

#puppet agent --test --server `hostname`

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值