How To Install Drupal 7 On Amazon EC2 Ubuntu Instance

There are four steps involved in installing the drupal content management system on amazon ubuntu instance.
  1. Launching ubuntu instance.
  2. Connecting UBUNTU using SSH client Putty.
  3. Installing the LAMP stack.
  4. Installing drupal on the lamp stack.

1.Launch the UBUNTU instance on EC2

                 
                    I have explained this in one of my tutorials. How to launch an Ubuntu instance on amazon EC2

2.Connect the Ubuntu instance using putty.

                    If you dont know to connect  the Ubuntu instance using putty, then follow the instructions given in the following tutorial . How To Connect An Amazon EC2 Ubuntu Instance Using Putty . Update the server  using the command   

3.Installing the LAMP stack on Ubuntu instance.

1.Install MySql on Ubuntu using the command

It takes few seconds to install.It will ask for a password.Give a password of your choice and remember it. It will be used later. 

amazon ec2 sql password
sql password
  
                                                                                                                                                                                     
2.Install Apache2 using the command


3.Install php using


4.Install php myadmin using

Select Apache using space bar during installation. It is shown in the figure below.

ALSO READ:  How To Set Up Owncloud Storage Server On Amazon Ec2
Ec2 apache selection
selecting apache

After selecting you will be asked if you want to configure with database. Select yes and provide the databse password you have given during MySql installion.[note:you have to enter the password three times]
once you complete the above steps, you are done with the LAMP stack installation.

After installing the LAMP stack we have to install the drupal installation file in the www folder. Inorder to locate that folder do the following steps.
                

                  [apache2–> apache configuration file]

                 2. # ls [shows all the folders inside apache2]

   

[sites enabled is a folder inside apache2]
                4. # ls [shows 000-default  file inside sites-enabled]

[ opens 000-default file]

www folder contains the index.html file, which will be there by default.
6. Now go to drupal website and copy the link of the installation file. [http://drupal.org/project/drupal]

7. To download drupal to your Ubuntu server type the following code

while doin this make sure you are on cd  /var/www folder]

8. Once drupal gets installed go to # cd /var/www and type
[removes the index.html file from the www folder]
9. The installed drupal file will be in .tar format, so inorder to extract it , type

10. Now change the owner to apache to write to your file system using



11. Now  public DNS of your Ubuntu instance [Eg: ec2-70-18-56-863.compute-1.amazonaws.com]
and paste it in the adress bar and load it. you can see the drupal files in the browser as shown in figure below.

ALSO READ:  How To Monitor and Automate AWS Infrastructure Using Finally.io
drupal isntall
drupal install



12. Click drupal-7.18 and continue the installation process.During the process it will ask for database name, user name and password. Now open a new tab and type your ec2 public dns followed by phpmyadmin    eg:  http://ec2-50-17-118-71.compute-1.amazonaws.com/phpmyadmin/. You will have to provide the user name as root and password is one which you used during the sql installation. Once you enter the credentials click login.

13. Go to–>Privileges–>add new user Enter the user name,password of your own. Give the host name as localhost . And under database user click the second option and click create user. Give the information’s as shown in the following figure.

14.Now go back to the tab where we left and enter the database name , database username, database password and click save and continue .You have the give the site information once drupal gets initialized.

14. Inorder to point the DNS to drupal you have to put all the drupal files in one foldr and put it inside the www folder. go to putty and type the following codes.

[add drupal to /var/www/

drupal] save and close it

15. Restart apache using # sudo  


You are done!! . You can manage your drupal using your dns of ubuntu instance.
DRUPAL INSTALLED AMI: ami-7813e011

Leave a Reply

Related

The main advantage of hosting your website on amazon EC2 is that you have full control over the server. You can do…

Read more

If you would prefer not to have the S3 extension in the URL for your website hosted on amazon S3 ,you have an option to…

Read more
ec2 file upload and download

Uploading and downloading files in AWS instance can be done using Filezilla client. If you are a windows user, you can…

Read more

Have some content ideas! We will help you publish it!

About

Cloud Computing Tutorial Blog

Navigation