Install & start Puppet
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.gzfrom 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/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/owner: change from root to puppet failed: Failed to set owner to '502': Operation not permitted - /var/lib/puppet/rrd
err: /File/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]