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.
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.
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.
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'
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.
When you install with gems, your confdir might be empty or missing. Populate it with these required files:
productionenvironment, as described in the directory environments page.
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.