13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ MONITORING AND UPDATINGTo install Puppet on Debian/Ubuntu, use this:sudo apt-get install puppetmasterThis will also install a set of Ruby packages. Puppet is also available for other distros or can becompiled from source. Because it’s still moving quite fast, for once installing from source may actuallybe preferable to using the packaged version, especially if you run into any problems. Note that (at thetime of this writing), the current package in Debian stable and Ubuntu is 0.24.5-3, while the currentsource release is 0.24.7.The main configuration file is at /etc/puppet/puppetmaster.conf:[puppetmasterd]# Make sure all log messages are sent to the right directory# This directory must be writable by the puppet userlogdir=/var/log/puppetvardir=/var/lib/puppetrundir=/var/runThe Puppet user is puppet, so to check directory ownership, use the following:chown puppet { /var/log/puppet, /var/lib/puppet }You almost certainly want to be able to store file content, for which you need a basic file serverconfiguration file at /etc/puppet/fileserver.conf:[files]path /etc/puppet/filesallow *.example.comThis specifies where files will be stored on the puppetmaster and allows access to all machines inexample.com. You can also ban specific machines or domains and can specify by IP address if preferred:deny *.evil.example.comallow 192.168.0.0/24The first time you run the puppetmaster daemon, use the mkusers and nonodes flags to create thedaemon user and to avoid it complaining that you haven’t set up any nodes yet:/usr/bin/puppetmasterd --mkusers --nonodesSetting Up a ClientOn Debian/Ubuntu, install with the following:sudo apt-get install puppet.Edit /etc/puppet/puppetd.conf to set the server name for your site:server = puppetserver.example.com80Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!