Skip to main content

SETTING AWS EC2 UBUNTU INSTANCE WITH LAMP SERVER

Amazon Web Service is the best place for web hosting. SInce it supports cloud computing. By this blog, you can easily setup an aws ec2 ubuntu server

Step 1 :
Sign into Amazon Console with your amazon credentials. Aws account is free for first year.


Step 2 :

Select your Region where you want to setup your ubuntu server. Later click on Ec2 Virtual Servers in the clouds menu in console menu list



Step 3 :

Click Launch an Instance



Step 4 :

Select Ubuntu Server 14.04 LTS in server type list

Step 5 :

Select server type. Select t2.micro or t2.small and later click Configure Instance Details



Step 6:

Click Add Storage Button


Step 7 :

Click Tag Instance Button


Step 8:

Give a value like "WebServer" for key "name" and click Configure Security group  Button



Step 9 :

Select pre existing group or create a new security group. Try to create default security group as below if no security groups exist. And last click Review and Launch button


Step 10 :

Click Launch button


Step 11 :

Now you need a keypair to log into your instance. So you can create a new key pair. Please save private key safely because it is required to login into server later.



Step 12 :

Click View Instance button


Now you can see your instance is initialising. It takes time to your server to be in running state.



Step 13 :

You can connect to your server using pem key you get after key pair creation. If you are using Windows, you need Putty to connect to server. Download Putty here. Follow this to connect to server from windows.

If you are using linux, you need terminal to connect to server using ssh command. Follow below commands

chmod 600 path/to/yourkeyname.pem                                                                                                   
ssh -i path/to/yourkeyname.pem ubuntu@ip.address                                                                             

Now you are connected to your server.

Step 14 :

Firstly, update your ubuntu server using below command

sudo apt-get update                                                                                                                               

Step 15 :

Once ubuntu is updated, execute below command to install full LAMP stack in your server.

sudo apt-get install lamp-server^                                                                                                         

Enter yes or 'y' when prompted to install MySQL. Also enter password twice. Please take note of this password because it is required to connect to database later


Step 16 :

Execute below command to install PHPMyAdmin

sudo apt-get install phpmyadmin                                                                                                         

Enter y and later select apache2 when prompter and followed by 'no' when asked to use default databases.


Step 17 :

You need to execute few more commands to make PHPMyAdmin accessed from browser.
In command line , execute following commands

sudo nano /etc/apache2/apache2.conf                                                                                             

This will open apache2.conf file. In this, add below lines to the end of the file

# Include web access to phpmyadmin                                                    
Include /etc/phpmyadmin/apache.conf                                                   


Step 18 :
Now restart apache server

sudo service apache2 restart                                                                                   

Now you will see below screen when you type your ip address in any browser.



This screen will come when you type ipaddress/phpmyadmin in your browser

At last your AWS Ec2 ubuntu server is successfully setuped.

Popular posts from this blog

Implementing Client Side WebRTC using Sipml5 javascript

Step 1:

Download and require Sipml5 library function.

Step 2:

Initialize sipml5 Engine in your web page :

var readyCallback = function(e) {
// function called when sipml is successfully initialised.
createSipStack(); // calling this function to create sip stack(see below)
};

var errorCallback = function(e) {
// function called when error occured during sipml initialisation.
};

SIPml.init(readyCallback, errorCallback);

Step 3:

Create Sip Stack :-
Sip Stack is an object that must be created before making/receiving call and sms. Creating Sip stack is an asynchronous process, so you need to create an event listener function to get state change notification.

var sipStack;

function EventListener(e) {

/*
* e.type ;type of event listener
* e.session ; current event session
* e.getSipResponseCode() ; event response code
* e.description ; event description
*/

if(e.type == 'started'){
// successfully started the stack.
register();
} else if(e.type == 'i_new_call'){
// when new incoming call comes.
      …

Setup Asterisk 13 with FreePBX 13 in CentOS 7

Launch CentOS 7 AWS Ec2 InstanceLog in to your aws consoleGo to ec2 management page and click Launch Instance on Instance pageIn Choose AMI step, go to AWS MarketPlace tab and search CentOS 7 on search field. List of centos 7 ami's will be available.Select CentOS 7 (x86_64) ami which is free tier eligible. Select your instance type and click configure instance. Keep default values from Configure Instance to Add Tags stepsIn configure security group, create a security group which allow minimum ports openSSH : port 22HTTP : port 80Custom UDP Rule : 10000-20000 (if you are giving RTP ports 10000-20000)Custom UDP Rule : 5060 (ChanSIP port)Custom TCP Rule : 5060 (ChanSIP Port)Click Launch Instance. Select your key file and accept terms to launch instance.
Setup CentOS Server SSH into newly created CentOS server with username centos and your key file.Update all existing packagessudo yum update -yNow start http service(you can access your server via browser by going to your server ip addres…

MULTIPLE FILE UPLOAD USING AJAX WITH PROGRESS BAR

Uploading multiple files using ajax makes a pleasant feeling to the user. It makes even more happier if upload progress status is printed with percentage.

            In this blog, you will make a file upload form using ajax with file upload progress bar.

Prerequisites :

1) Javascript supported browser
2) LAMP Server / XAMPP Server

Code :

index.html

<!DOCTYPE html>
<html> <head><title>Multiple File Upload using Ajax</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script> </head> <body><div><form action="action.php" method="post" enctype="multipart/form-data" id="multiple-upload-form"><input type="button" id="select-file-btn" value="Select Files" onclick="document.getElementById('files').click(); return false;&qu…