2025 Linux Admin & Learner Lab Installing httpd with instance metadata
Автор: Information Technology
Загружено: 2025-09-12
Просмотров: 27
Описание:
In this video, I demonstrate how to use AWS EC2 instance metadata and a user data script to automatically install and configure the Apache HTTP server (httpd). This approach allows you to launch a server that’s ready to serve web content immediately, without any manual setup after boot.
Script Breakdown
#!/bin/bash
yum install -y httpd
systemctl start httpd.service
systemctl enable httpd.service
usermod -a -G apache ec2-user
chown -R ec2-user:apache /var/www
chmod 2775 /var/www
find /var/www -type d -exec chmod 2775 {} \;
find /var/www -type f -exec chmod 0664 {} \;
echo "This is the way" not allowed**not allowed /var/www/html/index.html
What the Script Does
Install Apache (httpd) – Ensures the web server is available.
Start and enable the service – Runs Apache immediately and on reboot.
Configure user permissions – Adds ec2-user to the apache group and sets proper ownership.
Set directory and file permissions – Ensures the web root can be managed securely.
Create a default index page – Adds the text “This is the way” to /var/www/html/index.html.
What You’ll Learn
How to automate Apache installation during EC2 launch.
How user data scripts work in AWS for bootstrapping instances.
How to properly configure directory ownership and permissions.
How to deploy a ready-to-use web server on AWS with no manual steps.
Certifications This Helps With
This demo supports concepts in:
AWS Certified SysOps Administrator – Associate
AWS Certified Solutions Architect – Associate
CompTIA Linux+
Red Hat Certified System Administrator (RHCSA)
Why Watch?
If you’re learning cloud automation, AWS instance setup, or Linux system administration, this video gives you a hands-on example of how to configure a web server automatically at instance launch. It’s a real-world skill for DevOps, cloud, and sysadmin roles.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: