How to Install Drupal on Ubuntu 16.04

r00t December 28, 2017

Install Drupal on Ubuntu 16.04

In this tutorial we will show you how to install Drupal on Ubuntu 16.04. We will also install and configure its prerequisites. Drupal is one of the greatest free and accessible content management methods that used to create many of the sites you find daily. Easy content authoring, superb security, and reliable performance are a few of the most important benefits of using Drupal, but the most important quality of Drupal that sets it apart from other CMS is the flexibility and modularity that’s one of the core principals of it. It’s also an excellent choice for creating integrated electronic frameworks. You can extend it to anybody, or most, of thousands of add-ons. Modules expand Drupal’s functionality.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install Drupal on Ubuntu 16.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing LAMP on Ubuntu 16.04.

You should check out this LAMP stack install tutorial for Ubuntu 16.04, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that Drupal relies on:

apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-gd php7.0-mbstring php7.0-zip php7.0-dom php7.0-xml

Step 3. Installing Drupal.

First, download Drupal from the official web site. The latest stable release is 8.4.3 so you can download it with the following command:

cd /var/www/html
wget https://ftp.drupal.org/files/projects/drupal-8.4.3.tar.gz

Extract the files “drupal-8.4.3.tar.gz” to rebuild the drupal directory with these command:

tar -zxvf drupal-8.4.3.tar.gz

Copy all file on drupal-8.4.3 directory in to Apache‘s document root , we recommend to use rsync command for preserves permissions and data integrity:

rsync -avP drupal-8.4.3/ /var/www/html

Now just set the right permissions for the folders:

chown -R www-data:www-data /var/www/html

Step 4. Create a database for Drupal.

Next, we need to create a database for the Drupal installation:

mysql -uroot -p

Run the following command to create a database for Drupal:

MariaDB [(none)]> CREATE USER db_user@localhost IDENTIFIED BY 'Durpal@123#';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON drupal_db.* TO db_user@localhost;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Step 5. Accessing Drupal Web Installation.

Now you can access the Drupal web install wizard in your browser by entering the domain name or http://server_IP/ to continue your Drupal installation.

Congratulation’s! You have successfully install and configured Drupal content management on your Ubuntu 16.04 server. Thanks for using this tutorial installing Drupal on Ubuntu 16.04 LTS (Xenial Xerus) system.

The Tags:

Leave a Comment

Comments are closed.