As an important tool in automated O & M, puppet can be used for batch server or specified server software version updates and Configuration updates.
Let's talk less about theme.
Install puppet-server and puppet on the puppet server and client respectively.
Since puppet is developed based on Ruby, check whether the system has ruby before 1. If not, install it on your own.
The installation steps are as follows:
Yum install Ruby ruby-libs ruby-shadow
On the server and client, first download the RPM learned by puppet repository. This will automatically add the puppet Yum source to the system.
Rpm-uvh http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm
# Select a version based on the Operating System
Then, run
Yum install puppet-Server
On the client, run
Yum install puppet
Now, the installation is complete. The following is a simple configuration and tests whether a file can be pushed through puppet.
6. On the server side, Edit
VI/etc/puppet/manifests/site. PP
Node default
{
File
{
"/Tmp/puppet-test1.txt": content => "this is a puppet test! \ N ";
}
}
7. On the client
Puppet agent -- server cahoa.linux.net -- Test -- verbose -- debug -- no-daemonize
# Apply for authentication from the server, obtain files, enable verbose, debug, and re-output information # redirect to Console mode (no-daemonize)
8. You can see that the above command is run, and the final output is:
Exiting; no certificate found and waitforcert is disabled
The agent sends a certificate verification request to the master, waiting for the master to return the certificate.
9. Verify the client on the server
Puppet cert -- list
"Cahou.linux.net" (sha256) 22: 17: 7d: 3D: 0b: 02: **************************************** * ***************** (* content is omitted)
The server signs the verification client,
Puppet Cert sign cahou.linux.net -- verbose -- debug -- no-daemonize
10. Run the configuration again on the client and request server resources.
Puppet agent -- server cahoa.linux.net -- Test -- verbose -- debug -- no-daemonize
11. Check on the client. You can see that the specified content file has been created at the specified location.
CAT/tmp/puppet-test1.txt
This is a puppet test!
This article is from the "Linux and network" blog, please be sure to keep this source http://khaozi.blog.51cto.com/952782/1564979
Puppet --- a simple example