Free live webinar • November 21, 2026 • 9:30 AM CST   Register free →
2017–2027Celebrating Our 10th Year

Transform Your Career.
Engineer Your Future.

Build the skills to become an AI-Enabled DevSecOps & Cloud Engineer with 15 weeks of live training, hands-on labs and personal mentorship.

Coach AK in his DevOps learning studio
Coach AK | Ananth KannanSenior DevOps & SRE Architect • Founder, CoachDevOps
3,500+Students Trained
25+ YearsIT Experience
15 WeeksLive Training
70+Hands-on Labs

Master In-Demand Technologies

AWSAzureDockerKubernetesTerraformJenkinsGitHub ActionsAnsibleGitLab

AI-Enabled DevSecOps & Cloud Engineering Bootcamp

Next weekend batch: December 5, 2026
Saturday 9:30–11:30 AM CST • Sunday 10:30 AM–12:30 PM CST

Live classes, practical projects, personal mentorship and career preparation.

View Program Details →

Real Students. Real Success.

Career milestones shared by our students.

✓ Placement in an AI role
“The concepts you taught have improved my technical understanding and confidence.”
ManimaranJuly 2026 Bootcamp
✓ DevSecOps Engineer offer
“I want to sincerely thank you for your mentorship, training, and support.”
Femi AshayeCoachDevOps Alumni
✓ DevOps Engineer offer
“I got an offer for Devops engineer Last week and happy to inform you. I really appreciate you.”
EbenezerCoachDevOps Alumni
View All Success Stories →

Individual student experiences; employment is not guaranteed.

Ready to Take the Next Step?

Explore the program or get answers to your questions before enrolling.

Tuesday, April 28, 2020

Puppet Install LAMP stack on Ubuntu | How to install LAMP stack using Puppet on Ubuntu 18.0.4 Node

How to install LAMP (Apache, MySQL, PHP) stack in Ubuntu 18.0.4?


Pre-requisites:
Puppet agent is installed on the node.

Watch the steps in YouTube channel:


Login to Puppet Master, follow the below steps:

cd /opt/puppetlabs/puppet/modules
sudo mkdir lamp
cd lamp
sudo mkdir manifests
cd manifests
sudo vi init.pp
Copy the below lines in init.pp

class lamp {
# execute 'apt-get update'
exec { 'apt-update':                    # exec resource named 'apt-update'
  command => '/usr/bin/apt-get update'  # command this resource will run
}

# install apache2 package
package { 'apache2':
  require => Exec['apt-update'],        # require 'apt-update' before installing
  ensure => installed,
}

# ensure apache2 service is running
service { 'apache2':
  ensure => running,
}

# install mysql-server package
package { 'mysql-server':
  require => Exec['apt-update'],        # require 'apt-update' before installing
  ensure => installed,
}

# ensure mysql service is running
service { 'mysql':
  ensure => running,
}

# install php7 package
package { 'php7.2-cli':
  require => Exec['apt-update'],        # require 'apt-update' before installing
  ensure => installed,
}

# ensure info.php file exists
file { '/var/www/html/info.php':
  ensure => file,
  content => '<?php  phpinfo(); ?>',    # phpinfo code
  require => Package['apache2'],        # require 'apache2' package before creating
}
}

sudo vi /etc/puppetlabs/code/environments/production/manifests/site.pp
Add below line of code where node should be your target node where you already approved the certificate. the highlighted below section needs to be changed:

node 'your_target_puppet_agent_node_private_DNS_name' {
 include lamp
 }

Now to login to puppet agent node, execute the below command:
sudo /opt/puppetlabs/bin/puppet agent --test

You should see message like below:

Now make sure Apache is running on the target node by entering the target node(Agent's) public IP address on the browser. You should see Apache home page in the browser.

2 comments:

  1. The color of your blog is quite great. i would love to have those colors too on my blog.~:”;` my review here

    ReplyDelete
  2. Very informative article. Really looking forward to read more. Really Cool. best stacked dies machine

    ReplyDelete