Setup your Drupal and ftp in the Amazon EC2 micro instance

In this blog i will drive you through setting up Drupal project instance on  Ec2 micro instance of AWS and setting up ftp on your Drupal instance. Before this , of course you have to registered with AWS which is straight forward .

So , what we will understand from this blog :-

  1. Choosing OS and assigning some security rules on our instance .
  2. How to access our instance and play around it ?
  3. Setting up LAMP on our AWS micro instance
  4. Setting up ftp on AWS micro instance
  5. Managing your Drupal project using ftp connection using filezilla

Once you  are registered with AWS you have to login into your account . Among the AWS services just click on EC2 link which is nothing but a virtual server in the cloud . It will redirect you to EC2 dashboard where you can mange all your instance . Now for creating new instance follow below steps:-

  1. Just click on Launch instance select Classical wizard and click continue .
  2. Now you have to select Amazon Machine Image (AMI) from one of the tabbed lists below by clicking its Select button .
    Lets say we select Ubuntu 12.04 LTS .
  3. Next leave default settings except just select micro instance from the instance type because its free to use and click continue .
  4. Next again leave default setting and click continue .
  5. Next again leave default setting and click continue .
  6. Now you have to give name of your key and value . I recommend give key value name more sensible with your project and click continue .
  7. Now select creating a new key pair as we are new we don’t have exist key pair . Give name to your key pair file it should make sense with regards to your project . Download your keypair.pem file and save at a safe place because we need this file later .
  8. Next select create a new security group . Here we will assign some security rule and enable HTTP , ssh and ftp connection to our instance . HTTP port range is 80 , ssh port range is 22 , for ftp select custom TCP rule and give port range 21-22 . About source you can give any IP range as you need or just leave default for now.
  9. Just click continue and launch instance . Your instance will be running in some time as AWS will take some time to run your instance .

Now our EC2 micro instance is running . You can check out from your dashboard .

Now we setup LAMP in our Ubuntu 12.04 LTS instance . For this we access our Ubuntu instance from terminal and setup LAMP in that. Below are the steps to access and setup your LAMP in Ubuntu 12.04 LTS instance .

  1. Open your terminal and go to the directory where you stored your key pair file .pem file then run this command into your terminal sudo ssh -i file_name.pem .
  2. It will give you Ubuntu prompt in your terminal . You can understand like this that now you are logged in into your Ubuntu machine and you can do anything over their . The main thing here is you have to run all commands with “sudo” or as a root user which works on file system directory .
  3. In order to setup LAMP we will install three packages in it . Run these command from terminal :-
  • sudo apt-get install apache2
  • sudo apt-get install mysql-server
  • sudo apt-get php5 php-pear php5-mysql php5-suhosin

That’s it your LAMP environment is ready . You can check it by navigating your instance URL that is for example look like this in browser . It will give you message Localhost is working something like that .

Till here we got our LAMP environment running into our EC2 instance . Now we install our Drupal 7 instance in it . Here in Ubuntu instance we don’t have any ftp connection with ftp client or server. So we can use SCP for taking Drupal tarball from our local instance or we can use wget utility of Linux to download Drupal from its URL . Below are steps to install Drupal 7

  1. cd /var/www/
  2. wget
  3. tar xvf drupal-7.12.tar.gz
  4. mv drupal-7.12 drupal

Below is a link which can tell you how to install Drupal in Linux . Just follow all those steps .

When you setup with your mysql database and Drupal configuration then just browser link like for example :

It will take you to your Drupal site .

Now we will see how to setup ftp on Drupal instance .Why we need ftp for Drupal instance . In order to work on Drupal we have to use many modules ,themes  and libraries . So we have to upload those things on site . we can achieve this with SCP but that will be more difficult because you have to do via command line .  Here we will see how to setup Filezilla ftp on Drupal site which is on AWS EC2 . Below are the steps to setup filezilla as a ftp client .

  1. Install filezilla  into your local system :- sudo apt-get install filezilla
  2. Now open filezilla click on file > site manager
  3. Enter the details of your site here like :-
  • HOST –
  • Port– 22
  • Protocol – SFTP(SSH file transfer protocol )
  • Logon Type – Normal
  • User – ubuntu
  • Password – ubuntu . Then click on ok don’t click on connect this time .
  1. Now click on Edit> Settings > SFTP and addkeyfile . Navigate your .pem file here . It will ask you to convert .pem file just select ok . Now filezilla have your instance credentials to connect and everything is good to connect to your Drupal instance .
  2. Now click on file > site manager > connect

Now you can transfer all files from your local to Drupal instance .

I hope you enjoyed this blog. Please feel free to comment and send queries to me .

Reference :-

Thanks to Sonali , Anirudha , Chetan for reading draft of this 


20 thoughts on “Setup your Drupal and ftp in the Amazon EC2 micro instance

  1. First of all I would like to say great blog! I had a quick question which
    I’d like to ask if you don’t mind. I was interested to find out how
    you center yourself and clear your head before writing. I have had trouble clearing my mind in getting
    my ideas out there. I do take pleasure in writing but it just seems like the
    first 10 to 15 minutes are usually wasted just trying to figure out
    how to begin. Any recommendations or hints? Thank you!

  2. Fantastic goods from you, man. I have understand your stuff previous
    to and you’re just too magnificent. I actually like what you’ve acquired here, really
    like what you’re stating and the way in which you say it. You make it entertaining and you still care for to keep it sensible. I can’t
    wait to read much more from you. This is
    actually a terrific website.

  3. I simply want to say I am just very new to weblog and certainly loved this web blog. Very likely I’m likely to bookmark your website . You absolutely come with great articles. With thanks for sharing with us your website page.

  4. Hi there! Someone in my Myspace group shared this website with us so I came to give it a look.
    I’m definitely enjoying the information. I’m bookmarking and will be
    tweeting this to my followers! Terrific blog and excellent style and design.

  5. Hi there, I found your blog by way of Google even as searching for a comparable topic,
    your site came up, it seems to be great. I have bookmarked it in my google bookmarks.

    Hi there, simply changed into alert to your weblog thru Google, and located that it’s really informative. I’m
    going to watch out for brussels. I will be grateful in the event you proceed this in
    future. Numerous other people will be benefited from your writing.

  6. An outstanding share! I have just forwarded this onto a colleague
    who has been doing a little research on this.
    And he actually ordered me breakfast simply because I discovered it for him.

    .. lol. So let me reword this…. Thanks for the
    meal!! But yeah, thanx for spending the time to talk about this subject here on your internet

  7. Sweet blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed
    in Yahoo News? I’ve been trying for a while but I never seem to get there! Many thanks

  8. Appreciating the commitment you put into your blog
    and in depth information you present. It’s nice to come across a blog every once in a while that isn’t the same unwanted rehashed information.
    Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  9. Hello there! This post couldn’t be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this page to him. Fairly certain he will have a good read. Thanks for sharing!

  10. I discovered your “Setup your Drupal and ftp in the Amazon EC2 micro instance | Ashwini Kumar” page and noticed you could have a lot more traffic. I have found that the key to running a website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get traffic from and they let you try it for free. I managed to get over 300 targetted visitors to day to my website. Visit them today:

  11. This is a comment to the webmaster. I came to your “Setup your Drupal and ftp in the Amazon EC2 micro instance | Ashwini Kumar” page via Google but it was hard to find as you were not on the front page of search results. I know you could have more traffic to your website. I have found a website which offers to dramatically increase your rankings and traffic to your website: I managed to get close to 1000 visitors/day using their services, you could also get lot more targeted traffic from search engines than you have now. Their service brought significantly more traffic to my website. I hope this helps, happy new year!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s