drupal installtion on amazon ec2

How To Install and Setup Drupal On Amazon EC2 Instance

In this guide, I will explain how to install and setup Drupal on amazon ec2 ubuntu 14.04 server. This is a standalone installation with Drupal and database in a single server. For high traffic websites, it is advised to have a High Availability architecture with autoscaling and dedicated database instances. If you need help in deploying Drupal in HA mode, you can mail us at [email protected]

Install and Setup Drupal on Amazon EC2

To setup Drupal on an EC2 instance, you need the following on the server.

1. LAMP stack.
2. Few PHP modules related to Drupal
3. A dedicated database for Drupal.

Follow the guides given below to set up a working Drupal installation.

Spin Up an EC2 instance

Spinning up an EC2 instance is really easy. Follow this tutorial if you haven’t done that before. How to Spin Up an Ec2 Instance

Add Relevant Security Groups

Add the relevant port in the ec2 instance security group. In our case, we would require port 80 and 22. If you are setting up SSL in future, you might need to add 443 as well.

Connect to the new instance

You can follow this tutorial to connect to the instance using putty. How to connect EC2 instance using putty

Install LAMP Stack

1. Update the server.

2. Install the lamp stack.

Give a password when it prompts for it.

3. Verify the Apache installation by visiting the public IP of your instance. You should get a default apache page on your browser.

4. Verify MySQL server status

Install PHPMyAdmin

Open /etc/apache2/apache2.conf and add the following at the end of the line.

Restart apache2

Now you will be able to access PHPMyAdmin over the browser by appending phpmyadmin to the ip as shown below.

Create Database and User

Login to database.

Create database

Create a drupal user.

Grant all privileges to the drupaluser.

exit database.

Install php modules

Open /etc/php5/apache2/php.ini, search and set the following parmeters to off.

Enable apache rewrite functionality

Open /etc/apache2/sites-enabled/000-default.conf and change parameters as shown below.

Note: Replace example.com with your domain name and [email protected] with your email address.

Restart apache

Download Drupal Files

Go to https://www.drupal.org/download

Download the latest version

untar the files

cd into the extracted drupal directory and copy all the files to /var/www/html using the following command.

Set permissions of user and group

Install and Setup Drupal

Now, access the install page in the browser using the public IP of your instance and continue as normal Drupal installation. Give the database username and password that you have created during the database setup process.

That’s it. Once you complete the web-based installation, you will have a working Drupal Website.

Related

Using AWS command line tool (AWS cli) , you can manage most of the AWS resources.Ubuntu:In ubuntu AWS cli isstallation…

Read more
Install and Configure Nginx on Amazon ec2 RHEL and Ubuntu Instances

Nginx is a web server like apache. Not only as web server, it can act as a load balancer, reverse proxy etc.…

Read more
Password Authentication For AWS ec2 Instances

By default, ec2 instances don't have password authentication. You have to use the private key to connect to the…

Read more
About

Cloud Computing Tutorial Blog