Home / Articles / Devops / puppet / 6.0 / puppet-install

Installing Puppet on RHEL 7 / CentOS 7


Installing Puppet Server

  1. Enable the Puppet platform Yum repo
  2. rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
  3. Install puppet server
  4. yum install puppetserver
  5. Memory Configuration for puppet
  6. By default, Puppet Server is configured to use 2GB of RAM. If your server has less than 2 GB of RAM, then configure less memory by editing JAVA_ARGS parameter.
    vi /etc/sysconfig/puppetserver JAVA_ARGS="-Xms2g -Xmx2g" Example: For Setting Memory to 1 GB JAVA_ARGS="-Xms1g -Xmx1g" For Setting Memory to 512 MB JAVA_ARGS="-Xms512m -Xmx512m"
  7. Start and Enable puppet server service
  8. systemctl start puppetserver systemctl enable puppetserver



Installing Puppet Agent on Client Servers

  1. Enable the Puppet platform Yum repo
  2. rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
  3. Configure PATH Environment Variable
  4. Run the following command to source script that puppet-agent has installed
    source /etc/profile.d/puppet-agent.sh
  5. Configure puppet server setting
  6. puppet config set server puppet-master.example.com --section main
  7. Enable puppet agent service
  8. puppet resource service puppet ensure=running enable=true



Puppet Server Signing Agent Certificates

  1. List the certificates pending for signing
  2. /opt/puppetlabs/bin/puppetserver ca list
  3. Sign all Agent Certificates
  4. /opt/puppetlabs/bin/puppetserver ca sign --all
  5. Puppet Server Deployment Configuration
  6. Add the puppet configuration to following file which you want to push to all your client agents.
    vi /etc/puppetlabs/code/environments/production/manifests/site.pp



Testing connection from puppet Agent to puppet server

  • Login to the puppet Agent server and run following command to test Agent connection with puppet server.
  • puppet agent --test