Once you have provisioned an AWS ec2 instance installing Apache on amazon linux 2 is a straightforward and easy process. Here I’m going to show you how to install Apache web server on amazon linux 2 in a few steps.
- AWS account
- EC2 instance with Amazon Linux 2 template
Install Apache on AWS EC2 Amazon Linux 2 instance
Step 1. Update aws ec2 instance packages.
sudo yum update
Step 2. Install Apache.
sudo yum install httpd
Step 3. Once is installed start the service.
sudo systemctl start httpd
Step 4. To enable the service, run:
sudo systemctl enable httpd
Step 5. Check the status with:
sudo systemctl status httpd
As always our goal is to provide you with a quick and safe path of installing Apache on Amazon Linux 2 instance. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.