On this page

How To Install Drupal On Ubuntu 14.04

Version 1.0 Author: Srijan Kishore

This document describes how to install and configure Drupal on Ubuntu 14.04. Drupal is an open source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world.

1 Preliminary Note

This tutorial is based on Ubuntu 14.04 server, so you should set up a basic Ubuntu 14.04 server installation before you continue with this tutorial. The system should have a static IP address. I use 192.168.0.100 as my IP address in this tutorial and server1.example.com as the hostname. You must have a LAMP server installed in Ubuntu 14.04 as mentioned in the tutorial to continue further.

2 Database initialization

I will create the database for the Drupal as follows:

mysql -u root -p

Here we are adding database=drupaldb user=drupaluser and password=drupalpassword:

CREATE DATABASE drupaldb;

And a new MySQL user to access the Drupal database

CREATE USER drupaluser@localhost IDENTIFIED BY 'drupalpassword';

GRANT ALL PRIVILEGES ON drupaldb.* TO drupaluser@localhost;

Reload the MySQL database priveliges to activate the new MySQL user:

FLUSH PRIVILEGES;exit

3 Installation of Drupal

We will first make a directory temp in which I will the download the latest version of the Drupal as follows:

cd /tempwget http://ftp.drupal.org/files/projects/drupal-7.30.zip

We need to install unzip as by default it is now installed:

apt-get install unzip

Further moving ahead, please note that Drupal would always be dependent on a specific PHP module. Hence, if it is not yet installed on your server, you must immediately download php-gd using the following command:

apt-get updateapt-get install php5-gd

unzip the Drupal zip file in the following created folder:

unzip -q drupal-7.30.zip -d /var/www/html/

It will create a folder as /var/www/html/drupal-7.30, I will rename the folder as /var/www/html/drupal. Here I am removing the version name only: