How to install Drupal CMS – 8.5.0 on Ubuntu – 17.04
How to install Drupal CMS &ndash 8.5.0 on Ubuntu &ndash 17.04
Drupal is a popular open source Content Management System (CMS), which was released under GPL which is written in PHP language. It is used as a back-end framework for most of the websites and also used for knowledge management system. This tutorial explains how to install Drupal in Ubuntu 17.04
Prerequisites
Drupal CMS requires a web server to functionally based on LAMP setup on your system and also with following required PHP modules.
apt-get install php-mysql php-curl php-json php-cgi php libapache2-mod-php php-mcrypt php-xmlrpc php-gd php-mbstring php php-common php-xmlrpc php-soap php-xml php-intl php-cli php-ldap php-zip php-readline php-imap php-tidy php-recode
Installing Drupal CMS
Let' s begin with Updating the system repository.
root@linuxhelp1:~# apt-get update
Hit:1 http://old-releases.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://old-releases.ubuntu.com/ubuntu zesty-updates InRelease
Hit:3 http://old-releases.ubuntu.com/ubuntu zesty-backports InRelease
Hit:4 http://old-releases.ubuntu.com/ubuntu zesty-security InRelease
Reading package lists... Done
After updating the repositories create a database for Drupal and configure as follows.
root@linuxhelp1:~# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with or g. Your MariaDB connection id is 10 Server version: 10.1.25-MariaDB- Ubuntu 17.04 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type ' help ' or ' h' for help. Type ' c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE drupal Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON drupal.* TO ' drupaluser' @' localhost' IDENTIFIED BY ' 123' Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> EXIT Bye
And then switch to the /tmp directory for downloading the package.
root@linuxhelp1:~# cd /tmp/
You can download the package from the terminal using the following command.
root@linuxhelp1:/tmp# wget https://ftp.drupal.org/files/projects/drupal-8.5.0.tar.gz
--2018-03-27 12:02:30-- https://ftp.drupal.org/files/projects/drupal-8.5.0.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.1.175, 151.101.65.175, 151.101.129.175, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.1.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15535794 (15M) [application/octet-stream]
Saving to: ‘ drupal-8.5.0.tar.gz’
drupal-8.5.0.tar.gz 100%[==============================> ] 14.82M 947KB/s in 14s
2018-03-27 12:02:45 (1.05 MB/s) - ‘ drupal-8.5.0.tar.gz’ saved [15535794/15535794]
After downloading, extract the package.
root@linuxhelp1:/tmp# tar -zxvf drupal-8.5.0.tar.gz
drupal-8.5.0/
drupal-8.5.0/.csslintrc
drupal-8.5.0/.editorconfig
drupal-8.5.0/.eslintignore
drupal-8.5.0/.eslintrc.json
drupal-8.5.0/.gitattributes
drupal-8.5.0/.ht.router.php
drupal-8.5.0/.htaccess
.
.
drupal-8.5.0/vendor/zendframework/zend-feed/src/Writer/Renderer/RendererInterface.php
drupal-8.5.0/vendor/zendframework/zend-feed/src/Writer/Source.php
drupal-8.5.0/vendor/zendframework/zend-feed/src/Writer/StandaloneExtensionManager.php
drupal-8.5.0/vendor/zendframework/zend-feed/src/Writer/Version.php
drupal-8.5.0/vendor/zendframework/zend-feed/src/Writer/Writer.php
drupal-8.5.0/vendor/autoload.php
drupal-8.5.0/vendor/.htaccess
drupal-8.5.0/vendor/web.config
drupal-8.5.0/LICENSE.txt
And then move the extracted package to the apache root directory.
root@linuxhelp1:/tmp# mv drupal-8.5.0 /var/www/drupal
Let' s navigate to the Apache root directory now.
root@linuxhelp1:/tmp# cd /var/www/
We have to change ownership and permission for Drupal directory.
root@linuxhelp1:/var/www# chown -R www-data.www-data drupal
root@linuxhelp1:/var/www# chmod -R 775 drupal
Now we can create a virtual host for the Drupal.
root@linuxhelp1:/var/www# vim /etc/apache2/sites-available/drupal.conf [..] < virtualHost *:80> ServerName www.linuxhelp1.com DocumentRoot /var/www/drupal/ < Directory /var/www/drupal/> AllowOverride All allow from all < /Directory> < /VirtualHost>
After creating the virtual host enable the rewrite module.
root@linuxhelp1:/var/www# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
And then restart the apache to make the changes effect.
root@linuxhelp1:/var/www# systemctl restart apache2
After that, enable Apache2 modules by running the command below.
root@linuxhelp1:/var/www# a2enmod env Module env already enabled root@linuxhelp1:/var/www# a2enmod dir Module dir already enabled root@linuxhelp1:/var/www# a2enmod mime Module mime already enabled
Don' t forget to enable the site access.
root@linuxhelp1:/var/www# a2ensite drupal.conf
Enabling site drupal.
To activate the new configuration, you need to run:
systemctl reload apache2
Finally, restart the apache2 service to make all the changes to effect.
root@linuxhelp1:/var/www# systemctl restart apache2
Now you can proceed the further installation graphically from the browser by navigating to the following URL http://local IP (or) domain name.
First, choose the language for Drupal.
And then select the installation profile and continue.
Next, you need to configure the database of the Drupal CMS.
Now Drupal will start installing on your server.
After the installation, you must configure the site.

Now you will see the welcome page of Drupal CMS.
With this, the method to install Drupal CMS 8.5.0 on Ubuntu &ndash 17.04 comes to an end.
Comments ( 0 )
No comments available