- Sign into AWS
- Open EC2
- Click Instances on Left Side
- Click "Launch Instance"
- Select "Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type"
- Select Free Tier
- Click review and launch
- Press Launch
- Create Pair
- Download Pair
- Launch Instance
- Open list of Instances
- Swap in your file name:
chmod 400 ServerPair.pem
- Swap in your file name and ip address:
ssh -i "ServerPair.pem" [email protected]
- Update your instance
sudo yum update -y
- Install Apache Web Server, MySQL, PHP
sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd
- Start the Apache Web Server
sudo service httpd start
- Make it so Apache Web Server runs on server boot:
sudo chkconfig httpd on
- Verify it with:
chkconfig --list httpd
andhttpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- Go to your Public DNS or IPv4 Public IP: Example: ec2-54-152-134-146.compute-1.amazonaws.com
- Create a new user group
sudo groupadd www
- Add our EC2 User to this group
sudo usermod -a -G www ec2-user
- Leave the current session
exit
- Sign back in. Swap in your file name and ip address:
ssh -i "ServerPair.pem" [email protected]
- Verify
www
exists by running:groups
- Give
www
permission on server files/var/www
withsudo chown -R root:www /var/www
- Change file permissions:
sudo chmod 2775 /var/www
andfind /var/www -type d -exec sudo chmod 2775 {} \;
- Add a
index.html
invar/www/html
sotouch /var/www/html/index.html
andvi /var/www/html/index.html
then add content. - Go back to Instances (like the list)
- Right click on your new instance, select
Networking
, thenChange Security Group
- Take note of which one is selected
- Open Security Groups on the left side: https://console.aws.amazon.com/ec2/
- Edit the Inbound rules for that security group already assigned.
- Add Rule and set the type to be
HTTP
- Files sit in
ls -l /var/www
- Go to your IPv4 and you should see
Hello World!
Created
March 20, 2017 22:48
-
-
Save keithweaver/546e70bd0c88f4bef49b9051b3ba47bb to your computer and use it in GitHub Desktop.
Setting up a LAMP stack on Amazon Web Services (AWS) EC2
Rameswari-Jena
commented
Aug 8, 2019
via email
Hello
Where exactly you are getting stuck ?
…On Fri, Aug 9, 2019, 12:48 AM Vandana Vishwakarma ***@***.***> wrote:
Hi, i'm new and i want to host cms web app developed in codeiginator. can
you please tell me how to host in aws in step bye step procedure.
Thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/546e70bd0c88f4bef49b9051b3ba47bb?email_source=notifications&email_token=AL2LLNJI6TVMF4DD5ISHQB3QDRE6LA5CNFSM4IKMRBCKYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAFWW62#gistcomment-2993645>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL2LLNI62QQMJG4APQFW2CDQDRE6LANCNFSM4IKMRBCA>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment