In this tutorial we will show you how to install Drupal on Ubuntu 18.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 18.04 Bionic Beaver minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install Drupal on Ubuntu 18.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 18.04.
You should check out this LAMP stack install tutorial for Ubuntu 18.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 CMS relies on:
apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip
Step 3. Installing Drupal on Ubuntu 18.04.
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.5.3.tar.gz
Extract the files “drupal-8.4.3.tar.gz” to rebuild the drupal directory with these command:
tar -zxvf drupal-8.5.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.5.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 18.04 server. Thanks for using this tutorial installing Drupal on Ubuntu 18.04 LTS (Bionic Beaver) system.