Complete step by step process to host dynamic website on AWS EC2 instance (LAMP Stack)

Complete step by step process to host dynamic website on AWS EC2 instance (LAMP Stack)

CShelp4U

1 год назад

3,654 Просмотров

In this video you will learn:
1. Connecting to the Cloud9 IDE hosted on the EC2 instance
2. Analyzing the LAMP stack environment and confirming that the web server is accessible
Install and make the following service up and running:
Apache webserver
MySQL
PHP
3. Create a simple webpage and make it available over the internet by adding Security Group rule for http port 80

4. Installing a dynamic website application on the EC2 instance
5. Downaloding and Installing the café application code
6. Configure the MySQL database to support the application.
7. Creating a production environment
7.1 Creating an AMI and launching another EC2 instance
7.2 create the needed AWS Systems Manager parameters in the new AWS Region
8. Test development and production environment.


Follow below commands used in video:

sudo httpd -v
service httpd status

mysql --version
service mysqld status

php --version


Start the web server and the database, and also set them to start automatically after any future EC2 instance restart.

sudo chkconfig httpd on
sudo service httpd start
sudo service httpd status

sudo chkconfig mysqld on
sudo service mysqld start
sudo service mysqld status



Configure the EC2 instance so that you can use the AWS Cloud9 editor to edit web server files.
ln -s /var/www/ /home/ec2-user/environment
sudo chown ec2-user:ec2-user /var/www/html


wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/mod4-challenge/setup.tar.gz
tar -zxvf setup.tar.gz
wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/mod4-challenge/db.tar.gz
tar -zxvf db.tar.gz
wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-EN/mod4-challenge/cafe.tar.gz
tar -zxvf cafe.tar.gz


mv cafe /var/www/html/



cd setup
./set-app-parameters.sh


cd ../db/
./set-root-password.sh
./create-db.sh



mysql -u root -p



show databases;
use cafe_db;
show tables;
select * from product;
exit;

sudo sed -i "2i date.timezone = \"America/New_York\" " /etc/php.ini
sudo service httpd restart


AWS
DevOps
AWS solution arcchitect
Preparing an EC2 instance to host a website

Тэги:

#EC2 #Cloud9_IDE #Hosting_LAMP_applicaiton_on_EC2 #VPC #AWS_System_Manager_Parameter_store #AMI #Development_and_Production_Environement_on_AWS #LAMPStack #DynamicWebsite #WebHosting #WebDevelopment #PHP #MySQL #Apache #Linux #ServerSetup #WebsiteDeployment #AmazonWebServices #CloudHosting
Ссылки и html тэги не поддерживаются


Комментарии: