install puppet on almalinux

How to Install Puppet on AlmaLinux 9

Need to set up a Puppet server on AlmaLinux 9?

I have you covered.

Puppet empowers people with automation software to scale infrastructures. Installing and configuring a Puppet server could be tricky. In this comprehensive guide, I’ll walk you through step-by-step setting up your server on AlmaLinux 9.

Let’s dive in.

What You’ll Need

Before going into the steps, let’s have a quick look at the things you’ll require to follow this tutorial:

  • Two AlmaLinux 9 servers are installed and running (guide)
  • Familiarity with the Command Line Interface (CLI) and CLI commands (guide)
  • Root account or sudo privileges (guide)
  • Your registered domains
  • A stable internet connection

Let’s now jump into the steps of installing Puppet on AlmaLinux.

How to Install Puppet on AlmaLinux 9: Step-By-Step

Step 1: Enable the Puppet Platform Repository

The first thing you need to do is add Puppet’s repository to the repository list on your system. 

Doing this will allow your system to install packages from that repository.

  1. First, identify the package URL you intend to enable on your device. You can find the list here. For this tutorial, I’m going to go with Puppet 7. So the URL for that package is as follows:

  1. Next, enable that package URL using the below command:
sudo rpm -Uvh
add puppet repository to almalinux

Doing so should enable the targeted URL to allow installations on your system.

  1. To ensure that the process was successful, run the below command:
sudo dnf repolist
check repo list on almalinux

If you notice Puppet in this list, then it means the repository was enabled successfully.

Step 2: Install and Configure Puppet Server

If you’ve enabled the Puppet repository, then you’re ready to start installing it.

  1. Update your system so that you have access to the latest packages using the command below:
sudo dnf update
  1. Next, install the Puppet server on one AlmaLinux system using this command:
sudo yum install puppetserver
install puppet server on almalinux
  1. During the installation, you’ll be asked to confirm whether you want to import the GPG key. Enter y (as shown in the above screenshot) and press the Enter button.
  1. After that, you must add the Puppet server’s binary directory to your system so that you can start using the commands related to the package. For this, run the below commands:
source /etc/profile.d/
echo $PATH
add puppet server's binary directory to the system
  1. To ensure the installation was successful, you can check the current version of Puppet using this command:
puppetserver -v
check puppet server version
  1. If you’re done installing Puppet, then you need to start its service in case it’s not active by default:
sudo systemctl start puppetserver
  1. Lastly, find the exact binary Puppet file with this command:
which puppetserver
find the puppet binary file

The output shows the directory of the said binary file.

Step 3: Install Puppet Agent

Puppet agents are packages that transform code into executable commands. You will install the agent on the remaining AlmaLinux system.

  1. Go into the device where you want to install the agent package.
  2. Install Puppet agent with this command:
sudo yum install puppet-agent
install puppet agent on almalinux

When prompted to use the GPG key, enter y to confirm.

  1. Similar to what you did with the Puppet server package, you should load the Puppet agent system profile to your system. Do that by running the below commands:
source /etc/profile.d/
echo $PATH
  1. Next, find the binary file for the Puppet agent and check its version with the following commands:
which puppet
puppet --version
check puppet agent binary file
  1. If everything goes well, start the Puppet agent service and enable it using the below commands:
sudo systemctl start puppet
sudo systemctl enable puppet
start puppet on almalinux
  1. You can also check the service status to confirm it’s active. Check the status with the below command:
sudo systemctl status puppet
check puppet status on almalinux

As you can see from the above screenshot, it’s active and running. So that takes care of setting up the Puppet agent on the agent machine.

Step 4: Connect the Server Machine to the Agent Machine

I’ve installed and configured the Puppet server on the primary machine and the agent on the secondary machine. In this last step, I will connect both so that they can communicate with each other. 

For easier recognition, let’s call the primary server machine Alma1 and the agent machine Alma2. Let’s name the primary domain as and the agent one as

Let’s proceed.

  1. First, you need to set Alma1 as the primary machine that the agent can connect to. Do that with this command:
puppet config set server --section agent
  1. You also must set it as the Certification server so that you can verify the agents that want to connect. Set it as a CA server with the following command:
puppet config set ca_server --section agent
  1. Make sure that the setup is correct from the configuration file. To open the config file, run the below command:
cat /etc/puppetlabs/puppet/puppet.conf
  1. After that, you need to restart the Puppet service to have the changes take effect:
sudo systemctl restart puppet
  1. To verify, check Puppet’s status with the following command:
sudo systemctl status puppet
  1. Let’s now start the connection between the primary server and the agent:
puppet ssl bootstrap

Note: If you’re using a Puppet 5 agent, the command for that will be: puppet agent –test

  1. Go back to Alma1 and sign the certificate. To sign it, run the below command:
sudo puppetserver ca sign --certname
  1. After signing the certificate, the screen should display a success message. If you want to be sure that the signing was successful, list all the signed certificates with this command:
puppetserver ca list --all
  1. Lastly, go to Alma2, which is the agent machine. Run the agent once more with this command:
puppet ssl bootstrap

That’s pretty much it! You now should have a fully configured Puppet server running on AlmaLinux 9 with a connected agent.


This tutorial guides you through the process of installing Puppet on AlmaLinux 9. 

I’ve covered how to install a Puppet server and a Puppet agent before proceeding to connect both machines to establish communication. If you’re interested in other Puppet products, check out their free trial.

Want to know more about setting up servers on Linux? Learn how you can install Lighttpd Server on Ubuntu or install Froxlor Server Management on Debian.

If this guide helped you, please share it.

Related Posts