Skip to main content


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

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…

Start an android activity from cordova plugin

We all need to start an android activity from a cordova plugin. Here is a small and complete code to start an activity from cordova plugin
1. Install plugman to create cordova plugin npm install -g plugman2. Create cordova plugin using plugman plugman create --name PluginName --plugin_id com.example.sample.plugin --plugin_version 0.0.1
N.B : plugin id never start with Uppercase Now PluginName directory will be created. Plugin structure will be
> PluginName/

> |- plugin.xml

> |- src/

> |- www/PluginName.js

3. Add android platform to plugin
plugman platform add --platform_name android
Now plugin structure will be

> PluginName/

> |- plugin.xml

> |- src/android/

> |- www/PluginName.js

4. Now create a java file named in src/android diretory
This activity will be shown using our plugin. Write sample activity in
package com.example.sample.plugin; import; import android.os.Bundle;…

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.
} else if(e.type == 'i_new_call'){
// when new incoming call comes.