Note: This document covers open source releases of Puppet version 3.8 and lower. For current versions, you should see instructions for installing the latest version of Puppet or installing Puppet Enterprise.
On *nix platforms without native packages, you can install Puppet with Ruby’s
gem package manager. This isn’t recommended unless there are no native packages for your OS.
Before installing Puppet, review the pre-install tasks.
Step 1: Ensure Prerequisites are Installed
Use your OS’s package tools to install both Ruby and RubyGems. You might need to compile and install these yourself.
On Linux platforms, ensure that the LSB tools are installed. We recommend installing at least
lsb_release. See your OS’s documentation for details about its LSB tools.
Step 2: Install Puppet
To install Puppet and its dependencies, run:
sudo gem install puppet
Note: Read our tips on upgrading before upgrading your Puppet deployment.
To upgrade to the latest version of Puppet, you can run:
sudo puppet resource package puppet ensure=latest provider=gem
After upgrading, restart the
puppet service and, if applicable, the Puppet master web server.
Step 3: Pre-Configure Puppet
RubyGems lacks some of the conveniences that native packages have. To prepare for the post-install tasks, do the following:
The Puppet master service needs a
puppet user and group. If this node might ever act as a Puppet master server, do the following now:
sudo puppet resource group puppet ensure=present
sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
Create an Init Script for Puppet Agent
To run Puppet agent as a service, you need an init script (or whatever your OS’s equivalent is).
Because each platform handles init scripts differently, you must find one specific to your operating system or build one yourself based on what you know about your chosen operating system. The
ext directory in the Puppet source includes several example init scripts or service configurations for various operating systems:
Do not start the
puppet or Puppet master services yet.
Create a Confdir and Config Files
When you install with gems, your confdir might be empty or missing. Populate it with these required files:
- Make sure the confdir exists. This directory is usually at
- Create a puppet.conf file in the confdir. You can leave it empty until the post-install tasks.
- If this node will ever act as a Puppet master, it needs an auth.conf file. Use the default auth.conf file from the Puppet source, and put it in the confdir.
- Create a main manifest and a module directory. Alternately, enable directory environments in puppet.conf and create a
productionenvironment, as described in the directory environments page.
Make Sure Puppet Can be Loaded
puppet --version. This should output the version of Puppet you now have installed.
At this point, Puppet is installed, but it isn’t configured or running. You should now do the post-install tasks.