DevOps

Free AWS EC2 Ubuntu Instance Website setup

Amazon Web Service is a cloud platform which given us to create free AWS EC2 Ubuntu Instance hosting in both platform like Windows and Linux.
Here we are working on Ubuntu setup. Where we will install Apache2, PHP and MySQL.

1. First, you have to create a new account in AWS. If you have an existing account then no need to create.
2. After login you have to select EC2 option then you enter EC2 Dashboard.
3. Click Launch Instance
4. Select Free tier Eligible Ubuntu option.
5. Add New Volume EBS.
6. Add New Tag.
7. Add Security Group.

Type : SSH
Protocol: TCP
Port : 22
Source : Anywhere

Type : HTTP
Protocol : TCP
Port : 80
Source : Anywhere

8. Review and Launch
9. Create a New Pair Key. Download Key.
10. Using Puttygen.exe software create the public and private key.
11. Login SSH using putty.exe

Now we are ready to install Apache2, PHP, MySQL.

Command 1 ( Update Ubuntu server )

sudo apt-get update
sudo apt-get dist-upgrade

Command 2 ( Install apache2 server )

sudo apt-get install apache2

Command 3

sudo a2enmod rewrite

Command 4 ( Install php available version )

sudo apt-get install php

Sometime php7 not executing on Apache server. For that you need to just run following command

sudo apt install php libapache2-mod-php

Command 5 ( Start apache2 server )

sudo service apache2 restart

Command 6 ( Install MySQL server )

sudo apt-get install mysql-server

Command 7 ( Install PHPMyAdmin )

sudo apt-get install phpmyadmin
vim /etc/apache2/apache2.conf

Add the following to the bottom of the file:

# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf

And, restart Apache 2 with the following command:

service apache2 restart

Developer Diary

Share
Published by
Developer Diary
Tags: Ubuntu

Recent Posts

The Power of Email Marketing: Boosting Your Business’s Success

Introduction Even with the abundance of digital communication channels available today, email marketing is still…

11 hours ago

Laravel vs Node Js: Which One Is Good For What?

Introduction In the world of web development, selecting the correct framework is critical. Laravel and…

3 months ago

Docker Cheatsheet: Essential Commands and Explanations

Introduction By enabling containerization, Docker has transformed the way software is built, deployed, and managed.…

8 months ago

Difference between Memcached and REDIS – Secrets of Caching

Introduction Speed and efficiency are critical in the ever-changing world of web development. Effective caching…

8 months ago

How to Revert a Git Commit: A Simple Example

Introduction Git, a popular version control system in software development, enables developers to track changes,…

8 months ago

What is Git Stash and Why Do You Need It

Introduction Are you tired of grappling with tangled changes and unfinished work while using Git?…

8 months ago