Installing Puppet Master and Agent in RHEL/CentOS 7/6/5

Since the computer and computation came into existence the focus remained on automating the task at certain level. Automating task refers to completion of task mostly with itself with least or no human intervention. Most of the fields of engineering be it networking, aircraft, etc. implemented work automation in some form. Task Automation aims at saving Man power, Cost, Time, Energy and accomplish task with accuracy.

Automation at Server level is critical and automating task at server side is one of the most important task for every System Administrator. There are lots of wonderful tools available for System automation, but one tool which always comes to my mind is called Puppet.

Install Puppet in CentOS
Install Puppet in CentOS

What is Puppet?

Puppet is a Free and Open Source software released under Apache License and developed by Puppet Labs for GNU/Linux, Mac, BSD, Solaris and Windows based computer Systems. The project is written in ‘Ruby’ programming Language and it is mostly used at server automation for expressing system configuration as well as a client and server for distributing it, and a library for realizing the configuration.

The latest open source (community maintained) Puppet version <=2.7.26 was released under GNU General Public License.

Puppet Project Aims

Puppet Project Aims at having an expressive enough language supported by a powerful library. It Provide interface to write custom server automation applications in just a few lines of code. Puppet has rich extensibility feature with added functionality support as and when required. Last but not the least it lets you share your work with the world as simple as sharing codes.

Features of Puppet

  1. Designed in such a way that it prevents duplication for everyone solving the same problem.
  2. Mature Tool
  3. Powerful Framework
  4. Simplify System Administrator’s Technical Task.
  5. System Administrator’s task is written in Puppet’s Native code and can be shared.
  6. Makes it possible to make rapid and repeatable changes automatically.
  7. Maintains System Consistency and Integrity.
  8. Helpful in managing Physical and Virtual devices as well as cloud.

This article covers only installation of open source release of Pupper Server and Puppet Agent on RHEL/CentOS 7/6/5.

Step 1: Enable Dependencies and Puppet Labs Repository On Master

1. The server acting as a puppet master should have its system time set accurately. To set, accurate system time you should probably use NTP service. For more instructions on how to set correct system time with NTP, follow the below article.

  1. Set System Time with “NTP (Network Time Protocol)” in RHEL/CentOS

2. Once system time is set correctly, you should enable “optional” channel on RHEL distributions only, to install Puppet. For more instructions on how to enable “optional” channel on RHEL systems can be found Here.

3. Once channel is enabled, you can install latest versions of Puppet using Puppet Labs package repository on your correspondent RHEL/CentOS versions.

# rpm -ivh
# rpm -ivh
# rpm -ivh

Step 2: Installing and Upgrading Puppet on the Master Server

4. On your master server, run the following command to install Pupper Server, it will install an init script (/etc/init.d/puppetmaster) for executing a test-quality puppet master server.

Do not start puppet master service now.

# yum install puppet-server

5. Next, run the following command to upgrade Puppet to most newest version.

# puppet resource package puppet-server ensure=latest

6. Once upgrade process completes, you will need to restart the puppet master web server to reflect new changes.

# /etc/init.d/puppetmaster restart

Step 3: Installing and Upgrading Puppet on Agent Node

7. Login to your agent node server and run the following command to install Puppet agent. Once you install Puppet agent, you may notice that an init script (/etc/init.d/puppet) has been generated for running the puppet agent daemon.

Do not start puppet agent service now.

# yum install puppet

8. Now upgrade the installed puppet agent to the most recent versions, with the help of following command.

# puppet resource package puppet ensure=latest

9. Once upgrade completes, you will need to restart the puppet service to take new changes.

# /etc/init.d/puppet restart

That’s it! at this moment, your Puppet server and Agent installed successfully, but it isn’t configured properly, to do so you need to follow the post-install and configuration tasks at.

Puppet: Post-Install Tasks and Configuration


Puppet automation tool seems robust, user friendly interface, as well as very declarative. Installation was very easy for me it was nothing to worry about dependencies at installation.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

20 thoughts on “Installing Puppet Master and Agent in RHEL/CentOS 7/6/5”

  1. [email protected] puppet-master]# yum install puppetserver
    Loaded plugins: fastestmirror, langpacks
    Repository ‘puppetlabs-devel’: Error parsing config: Error parsing “baseurl = ‘′”: URL must be http, ftp, file or https not “”
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    –> Running transaction check
    —> Package puppetserver.noarch 0:5.3.10-1.el7 will be installed
    –> Processing Dependency: puppet-agent >= 4.99.0 for package: puppetserver-5.3.10-1.el7.noarch
    –> Processing Dependency: java-1.8.0-openjdk-headless for package: puppetserver-5.3.10-1.el7.noarch
    –> Running transaction check
    —> Package puppet-agent.x86_64 0:5.5.17-1.el7 will be installed
    —> Package puppetserver.noarch 0:5.3.10-1.el7 will be installed
    –> Processing Dependency: java-1.8.0-openjdk-headless for package: puppetserver-5.3.10-1.el7.noarch
    –> Finished Dependency Resolution
    Error: Package: puppetserver-5.3.10-1.el7.noarch (puppet5)
    Requires: java-1.8.0-openjdk-headless
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

  2. I am getting below error while generating certificate in one of our server. So how to resolve this issue?

    [[email protected] bin]# puppet agent --test1 --ca_server=master.yumserver_rhel7
    /opt/puppetlabs/puppet/bin/ruby: /lib64/ version `XCRYPT_2.0' not found (required by /opt/puppetlabs/puppet/lib/
    /opt/puppetlabs/puppet/bin/ruby: /lib64/ version `GLIBC_2.25' not found (required by /opt/puppetlabs/puppet/lib/
    /opt/puppetlabs/puppet/bin/ruby: /lib64/ version `XCRYPT_2.0' not found (required by /opt/puppetlabs/puppet/lib/
    /opt/puppetlabs/puppet/bin/ruby: /lib64/ version `GLIBC_2.25' not found (required by /opt/puppetlabs/puppet/lib/

  3. Puppetmaster has been renamed to puppetserver to prevent twitter outrage mobs from attacking Puppetlabs. Slavery was invented by wypipo or something.

  4. Very thanks!

    Just an alert:
    If you are running a centos 7, there is no script in /etc/init.d, because of systemd.
    Then you need to control it via systemctl, as follows:

    To verify service status:
    systemctl status puppetmaster

    To restart service:
    systemctl restart puppetmaster

    To enable service to start on boot:
    systemctl enable puppetmaster

    • Dear Thilina,

      Thanks for creating easy bash script to install puppet, will surely give it a try on RHEL/CentOS 7, will update you..

  5. Hi Kumar,

    Everybody knows how to install rpm’s. We need articles on how to maintain 50 production servers with puppet. How to make one single configuration in 50 servers change from one single click on master.


    • Dear Nagu,
      me too believes the same.
      Anyway, its now the admin’s responsibility what they want to include and exclude in the future article.


Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.